Invis to animals spell - need a bit help

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 2 weeks ago - 2 months 2 weeks ago #8370 by JTP
Hi

Ok i have defined the spell, i Can cast the spell.

I appear If fighting, i appear If typing visible.

But where do i make the part so that animals cant see me ?

I have race animal i Can set on mobs. #define CLASS_NPC_ANIMAL


And anything else missing ?
Last edit: 2 months 2 weeks ago by JTP.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 2 weeks ago - 2 months 1 week ago #8372 by JTP
Hmm i have spend many many hours searching where to add my new spell, to be invis to animals. I just cant figure it out.

Not even searching for AFF_INVISIBLE to find out How that works, makes me find out. It just seems it is what i already found with appear when fighting, and informative who list, when you look and times.


Need help please.
Last edit: 2 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #8376 by thomas
Replied by thomas on topic Invis to animals spell - need a bit help
Check out the define called CAN_SEE in utils.h. It has a long list of "preconditions", among them a define called INVIS_OK.

github.com/tbamud/tbamud/blob/master/src/utils.h#L767
#define INVIS_OK(sub, obj) \
 ((!AFF_FLAGGED((obj),AFF_INVISIBLE) || AFF_FLAGGED(sub,AFF_DETECT_INVIS)) && \
 (!AFF_FLAGGED((obj), AFF_HIDE) || AFF_FLAGGED(sub, AFF_SENSE_LIFE)))
This is where you add your logic. Be advised that it's not straight forward. I think it sohuld be something like this:
#define INVIS_OK(sub, obj) \
 ((!AFF_FLAGGED((obj),AFF_INVISIBLE) || AFF_FLAGGED(sub,AFF_DETECT_INVIS)) && \
 (!AFF_FLAGGED((obj), AFF_HIDE) || AFF_FLAGGED(sub, AFF_SENSE_LIFE)) && \
(!AFF_FLAGGED((obj), AFF_INVIS_TO_ANIMALS) || (IS_NPC(sub) || !IS_NPC_CLASS((sub), NPC_CLASS_ANIMAL)))

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago #8377 by JTP
(!AFF_FLAGGED((obj), AFF_INVIS_TO_ANIMALS) || (IS_NPC(sub) || !IS_NPC_CLASS((sub), NPC_CLASS_ANIMAL)))

Could you explain this, Why first || (IS_NPC(sub) ||

And Then !IS_NPC_CLASS((sub), NPC_CLASS_ANIMAL)))

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago - 2 months 1 week ago #8378 by JTP
Compiling gave:
gcc -g -O2 -Wall    -c -o act.comm.o act.comm.c
act.comm.c: In function ‘do_write’:
act.comm.c:446: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.comm.c:446: warning: value computed is not used
act.comm.c:446: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.informative.o act.informative.c
act.informative.c: In function ‘list_obj_to_char’:
act.informative.c:235: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.informative.c:235: warning: value computed is not used
act.informative.c:235: warning: value computed is not used
act.informative.c:238: warning: value computed is not used
act.informative.c:238: warning: value computed is not used
act.informative.c: In function ‘diag_char_to_char’:
act.informative.c:274: warning: value computed is not used
act.informative.c: In function ‘look_at_char’:
act.informative.c:322: warning: value computed is not used
act.informative.c:329: warning: value computed is not used
act.informative.c:341: warning: value computed is not used
act.informative.c:341: warning: value computed is not used
act.informative.c:348: warning: value computed is not used
act.informative.c:348: warning: value computed is not used
act.informative.c: In function ‘list_one_char’:
act.informative.c:466: warning: value computed is not used
act.informative.c:466: warning: value computed is not used
act.informative.c:473: warning: value computed is not used
act.informative.c:483: warning: value computed is not used
act.informative.c: In function ‘list_char_to_char’:
act.informative.c:530: warning: value computed is not used
act.informative.c: In function ‘look_at_target’:
act.informative.c:783: warning: value computed is not used
act.informative.c:804: warning: value computed is not used
act.informative.c:804: warning: value computed is not used
act.informative.c:812: warning: value computed is not used
act.informative.c:812: warning: value computed is not used
act.informative.c:821: warning: value computed is not used
act.informative.c:821: warning: value computed is not used
act.informative.c: In function ‘do_equipment’:
act.informative.c:1175: warning: value computed is not used
act.informative.c:1175: warning: value computed is not used
act.informative.c: In function ‘do_who’:
act.informative.c:1434: warning: value computed is not used
act.informative.c:1438: warning: value computed is not used
act.informative.c:1484: warning: value computed is not used
act.informative.c: In function ‘do_users’:
act.informative.c:1738: warning: value computed is not used
act.informative.c:1789: warning: value computed is not used
act.informative.c: In function ‘perform_mortal_where’:
act.informative.c:1871: warning: value computed is not used
act.informative.c:1881: warning: value computed is not used
act.informative.c: In function ‘print_object_location’:
act.informative.c:1910: warning: value computed is not used
act.informative.c:1912: warning: value computed is not used
act.informative.c: In function ‘perform_immort_where’:
act.informative.c:1934: warning: value computed is not used
act.informative.c:1948: warning: value computed is not used
act.informative.c:1961: warning: value computed is not used
act.informative.c:1961: warning: value computed is not used
act.informative.c: In function ‘list_scanned_chars’:
act.informative.c:2894: warning: value computed is not used
act.informative.c:2906: warning: value computed is not used
act.informative.c: In function ‘do_affections’:
act.informative.c:3138: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.item.o act.item.c
act.item.c: In function ‘do_put’:
act.item.c:160: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.item.c:160: warning: value computed is not used
act.item.c:160: warning: value computed is not used
act.item.c: In function ‘get_from_container’:
act.item.c:266: warning: value computed is not used
act.item.c:266: warning: value computed is not used
act.item.c: In function ‘get_from_room’:
act.item.c:323: warning: value computed is not used
act.item.c:323: warning: value computed is not used
act.item.c: In function ‘do_get’:
act.item.c:378: warning: value computed is not used
act.item.c:378: warning: value computed is not used
act.item.c:389: warning: value computed is not used
act.item.c:389: warning: value computed is not used
act.item.c: In function ‘do_give’:
act.item.c:755: warning: value computed is not used
act.item.c:755: warning: value computed is not used
act.item.c: In function ‘do_wear’:
act.item.c:1416: warning: value computed is not used
act.item.c:1416: warning: value computed is not used
act.item.c: In function ‘do_remove’:
act.item.c:1587: warning: value computed is not used
act.item.c:1587: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.movement.o act.movement.c
act.movement.c: In function ‘do_enter’:
act.movement.c:824: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.movement.c:824: warning: value computed is not used
act.movement.c:824: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.offensive.o act.offensive.c
act.offensive.c: In function ‘do_assist’:
act.offensive.c:64: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.offensive.c:64: warning: value computed is not used
act.offensive.c: In function ‘do_listen’:
act.offensive.c:1191: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.other.o act.other.c
act.other.c: In function ‘do_steal’:
act.other.c:209: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.other.c:209: warning: value computed is not used
act.other.c:209: warning: value computed is not used
gcc -g -O2 -Wall    -c -o act.social.o act.social.c
gcc -g -O2 -Wall    -c -o act.wizard.o act.wizard.c
act.wizard.c: In function ‘do_stat_room’:
act.wizard.c:573: warning: implicit declaration of function ‘IS_NPC_CLASS’
act.wizard.c:573: warning: value computed is not used
act.wizard.c:591: warning: value computed is not used
act.wizard.c:591: warning: value computed is not used
act.wizard.c: In function ‘do_stat_character’:
act.wizard.c:925: warning: value computed is not used
act.wizard.c: In function ‘do_dc’:
act.wizard.c:1758: warning: value computed is not used
act.wizard.c: In function ‘do_wiznet’:
act.wizard.c:2240: warning: value computed is not used
act.wizard.c:2279: warning: value computed is not used
act.wizard.c: In function ‘do_show’:
act.wizard.c:2665: warning: value computed is not used
act.wizard.c:2763: warning: value computed is not used
gcc -g -O2 -Wall    -c -o aedit.o aedit.c
gcc -g -O2 -Wall    -c -o asciimap.o asciimap.c
gcc -g -O2 -Wall    -c -o ban.o ban.c
gcc -g -O2 -Wall    -c -o boards.o boards.c
gcc -g -O2 -Wall    -c -o castle.o castle.c
gcc -g -O2 -Wall    -c -o cedit.o cedit.c
gcc -g -O2 -Wall    -c -o clan.o clan.c
gcc -g -O2 -Wall    -c -o class.o class.c
gcc -g -O2 -Wall    -c -o comm.o comm.c
comm.c: In function ‘perform_act’:
comm.c:2622: warning: implicit declaration of function ‘IS_NPC_CLASS’
comm.c:2622: warning: value computed is not used
comm.c:2625: warning: value computed is not used
comm.c:2650: warning: value computed is not used
comm.c:2650: warning: value computed is not used
comm.c:2653: warning: value computed is not used
comm.c:2653: warning: value computed is not used
comm.c:2657: warning: value computed is not used
comm.c:2657: warning: value computed is not used
comm.c:2660: warning: value computed is not used
comm.c:2660: warning: value computed is not used
comm.c: In function ‘act’:
comm.c:2806: warning: value computed is not used
comm.c: In function ‘msdp_update’:
comm.c:2994: warning: value computed is not used
gcc -g -O2 -Wall    -c -o config.o config.c
gcc -g -O2 -Wall    -c -o constants.o constants.c
gcc -g -O2 -Wall    -c -o db.o db.c
gcc -g -O2 -Wall    -c -o dg_comm.o dg_comm.c
dg_comm.c: In function ‘sub_write_to_char’:
dg_comm.c:64: warning: implicit declaration of function ‘IS_NPC_CLASS’
dg_comm.c:64: warning: value computed is not used
dg_comm.c:73: warning: value computed is not used
dg_comm.c:79: warning: value computed is not used
dg_comm.c:88: warning: value computed is not used
dg_comm.c:97: warning: value computed is not used
dg_comm.c:109: warning: value computed is not used
dg_comm.c:109: warning: value computed is not used
gcc -g -O2 -Wall    -c -o dg_db_scripts.o dg_db_scripts.c
gcc -g -O2 -Wall    -c -o dg_event.o dg_event.c
gcc -g -O2 -Wall    -c -o dg_handler.o dg_handler.c
gcc -g -O2 -Wall    -c -o dg_misc.o dg_misc.c
gcc -g -O2 -Wall    -c -o dg_mobcmd.o dg_mobcmd.c
dg_mobcmd.c: In function ‘do_mforce’:
dg_mobcmd.c:688: warning: implicit declaration of function ‘IS_NPC_CLASS’
dg_mobcmd.c:688: warning: value computed is not used
gcc -g -O2 -Wall    -c -o dg_objcmd.o dg_objcmd.c
gcc -g -O2 -Wall    -c -o dg_olc.o dg_olc.c
gcc -g -O2 -Wall    -c -o dg_scripts.o dg_scripts.c
gcc -g -O2 -Wall    -c -o dg_triggers.o dg_triggers.c
dg_triggers.c: In function ‘greet_memory_mtrigger’:
dg_triggers.c:173: warning: implicit declaration of function ‘IS_NPC_CLASS’
dg_triggers.c:173: warning: value computed is not used
dg_triggers.c: In function ‘greet_mtrigger’:
dg_triggers.c:216: warning: value computed is not used
dg_triggers.c: In function ‘leave_mtrigger’:
dg_triggers.c:570: warning: value computed is not used
dg_triggers.c: In function ‘door_mtrigger’:
dg_triggers.c:597: warning: value computed is not used
gcc -g -O2 -Wall    -c -o dg_variables.o dg_variables.c
dg_variables.c: In function ‘find_replacement’:
dg_variables.c:506: warning: implicit declaration of function ‘IS_NPC_CLASS’
dg_variables.c:506: warning: value computed is not used
dg_variables.c:619: warning: value computed is not used
gcc -g -O2 -Wall    -c -o dg_wldcmd.o dg_wldcmd.c
gcc -g -O2 -Wall    -c -o fight.o fight.c
fight.c: In function ‘perform_violence’:
fight.c:1225: warning: implicit declaration of function ‘IS_NPC_CLASS’
fight.c:1225: warning: value computed is not used
fight.c:1225: warning: value computed is not used
fight.c:1255: warning: value computed is not used
gcc -g -O2 -Wall    -c -o genmob.o genmob.c
gcc -g -O2 -Wall    -c -o genobj.o genobj.c
gcc -g -O2 -Wall    -c -o genolc.o genolc.c
gcc -g -O2 -Wall    -c -o genqst.o genqst.c
gcc -g -O2 -Wall    -c -o genshp.o genshp.c
gcc -g -O2 -Wall    -c -o genwld.o genwld.c
gcc -g -O2 -Wall    -c -o genzon.o genzon.c
gcc -g -O2 -Wall    -c -o graph.o graph.c
gcc -g -O2 -Wall    -c -o handler.o handler.c
handler.c: In function ‘get_player_vis’:
handler.c:1092: warning: implicit declaration of function ‘IS_NPC_CLASS’
handler.c:1092: warning: value computed is not used
handler.c: In function ‘get_char_room_vis’:
handler.c:1122: warning: value computed is not used
handler.c: In function ‘get_char_world_vis’:
handler.c:1150: warning: value computed is not used
handler.c: In function ‘get_obj_in_list_vis’:
handler.c:1185: warning: value computed is not used
handler.c:1185: warning: value computed is not used
handler.c: In function ‘get_obj_vis’:
handler.c:1217: warning: value computed is not used
handler.c:1217: warning: value computed is not used
handler.c: In function ‘get_obj_in_equip_vis’:
handler.c:1237: warning: value computed is not used
handler.c:1237: warning: value computed is not used
handler.c: In function ‘get_obj_pos_in_equip_vis’:
handler.c:1257: warning: value computed is not used
handler.c:1257: warning: value computed is not used
gcc -g -O2 -Wall    -c -o hedit.o hedit.c
gcc -g -O2 -Wall    -c -o house.o house.c
gcc -g -O2 -Wall    -c -o ibt.o ibt.c
gcc -g -O2 -Wall    -c -o improved-edit.o improved-edit.c
gcc -g -O2 -Wall    -c -o interpreter.o interpreter.c
gcc -g -O2 -Wall    -c -o limits.o limits.c
gcc -g -O2 -Wall    -c -o lists.o lists.c
gcc -g -O2 -Wall    -c -o magic.o magic.c
gcc -g -O2 -Wall    -c -o mail.o mail.c
gcc -g -O2 -Wall    -c -o medit.o medit.c
gcc -g -O2 -Wall    -c -o mobact.o mobact.c
mobact.c: In function ‘mobile_activity’:
mobact.c:68: warning: implicit declaration of function ‘IS_NPC_CLASS’
mobact.c:68: warning: value computed is not used
mobact.c:68: warning: value computed is not used
mobact.c:98: warning: value computed is not used
mobact.c:123: warning: value computed is not used
mobact.c:148: warning: value computed is not used
gcc -g -O2 -Wall    -c -o modify.o modify.c
gcc -g -O2 -Wall    -c -o msgedit.o msgedit.c
gcc -g -O2 -Wall    -c -o mud_event.o mud_event.c
gcc -g -O2 -Wall    -c -o oasis.o oasis.c
gcc -g -O2 -Wall    -c -o oasis_copy.o oasis_copy.c
gcc -g -O2 -Wall    -c -o oasis_delete.o oasis_delete.c
gcc -g -O2 -Wall    -c -o oasis_list.o oasis_list.c
gcc -g -O2 -Wall    -c -o objsave.o objsave.c
objsave.c: In function ‘Crash_report_unrentables’:
objsave.c:809: warning: implicit declaration of function ‘IS_NPC_CLASS’
objsave.c:809: warning: value computed is not used
objsave.c:809: warning: value computed is not used
objsave.c: In function ‘Crash_report_rent’:
objsave.c:829: warning: value computed is not used
objsave.c:829: warning: value computed is not used
objsave.c: In function ‘gen_receptionist’:
objsave.c:911: warning: value computed is not used
gcc -g -O2 -Wall    -c -o oedit.o oedit.c
oedit.c: In function ‘do_oasis_oedit’:
oedit.c:105: warning: implicit declaration of function ‘IS_NPC_CLASS’
oedit.c:105: warning: value computed is not used
gcc -g -O2 -Wall    -c -o players.o players.c
gcc -g -O2 -Wall    -c -o prefedit.o prefedit.c
prefedit.c: In function ‘do_oasis_prefedit’:
prefedit.c:940: warning: implicit declaration of function ‘IS_NPC_CLASS’
prefedit.c:940: warning: value computed is not used
prefedit.c:942: warning: value computed is not used
gcc -g -O2 -Wall    -c -o protocol.o protocol.c
gcc -g -O2 -Wall    -c -o qedit.o qedit.c
qedit.c: In function ‘do_oasis_qedit’:
qedit.c:109: warning: implicit declaration of function ‘IS_NPC_CLASS’
qedit.c:109: warning: value computed is not used
gcc -g -O2 -Wall    -c -o quest.o quest.c
gcc -g -O2 -Wall    -c -o races.o races.c
gcc -g -O2 -Wall    -c -o random.o random.c
gcc -g -O2 -Wall    -c -o redit.o redit.c
redit.c: In function ‘do_oasis_redit’:
redit.c:86: warning: implicit declaration of function ‘IS_NPC_CLASS’
redit.c:86: warning: value computed is not used
gcc -g -O2 -Wall    -c -o sedit.o sedit.c
sedit.c: In function ‘do_oasis_sedit’:
sedit.c:101: warning: implicit declaration of function ‘IS_NPC_CLASS’
sedit.c:101: warning: value computed is not used
gcc -g -O2 -Wall    -c -o shop.o shop.c
shop.c: In function ‘is_ok_char’:
shop.c:135: warning: implicit declaration of function ‘IS_NPC_CLASS’
shop.c:135: warning: value computed is not used
shop.c: In function ‘get_slide_obj_vis’:
shop.c:432: warning: value computed is not used
shop.c:432: warning: value computed is not used
shop.c: In function ‘get_hash_obj_vis’:
shop.c:454: warning: value computed is not used
shop.c:454: warning: value computed is not used
shop.c: In function ‘shopping_list’:
shop.c:954: warning: value computed is not used
shop.c:954: warning: value computed is not used
gcc -g -O2 -Wall    -c -o spec_assign.o spec_assign.c
gcc -g -O2 -Wall    -c -o spec_procs.o spec_procs.c
spec_procs.c: In function ‘npc_steal’:
spec_procs.c:635: warning: implicit declaration of function ‘IS_NPC_CLASS’
spec_procs.c:635: warning: value computed is not used
spec_procs.c: In function ‘cityguard’:
spec_procs.c:878: warning: value computed is not used
gcc -g -O2 -Wall    -c -o spell_parser.o spell_parser.c
gcc -g -O2 -Wall    -c -o spells.o spells.c
spells.c: In function ‘spell_locate_object’:
spells.c:294: warning: implicit declaration of function ‘IS_NPC_CLASS’
spells.c:294: warning: value computed is not used
spells.c:300: warning: value computed is not used
spells.c: In function ‘spell_heroes_feast’:
spells.c:815: warning: value computed is not used
gcc -g -O2 -Wall    -c -o tedit.o tedit.c
gcc -g -O2 -Wall    -c -o utils.o utils.c
utils.c: In function ‘stop_follower’:
utils.c:600: warning: implicit declaration of function ‘IS_NPC_CLASS’
utils.c:600: warning: value computed is not used
utils.c: In function ‘add_follower’:
utils.c:680: warning: value computed is not used
gcc -g -O2 -Wall    -c -o weather.o weather.c
gcc -g -O2 -Wall    -c -o zedit.o zedit.c
zedit.c: In function ‘do_oasis_zedit’:
zedit.c:114: warning: implicit declaration of function ‘IS_NPC_CLASS’
zedit.c:114: warning: value computed is not used
gcc -o ../bin/circle  act.comm.o act.informative.o act.item.o act.movement.o act.offensive.o act.other.o act.social.o act.wizard.o aedit.o asciimap.o ban.o boards.o bsd-snprintf.o castle.o cedit.o clan.o class.o comm.o config.o constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o dg_triggers.o dg_variables.o dg_wldcmd.o fight.o genmob.o genobj.o genolc.o genqst.o genshp.o genwld.o genzon.o graph.o handler.o hedit.o house.o ibt.o improved-edit.o interpreter.o limits.o lists.o magic.o mail.o medit.o mobact.o modify.o msgedit.o mud_event.o oasis.o oasis_copy.o oasis_delete.o oasis_list.o objsave.o oedit.o players.o prefedit.o protocol.o qedit.o quest.o races.o random.o redit.o sedit.o shop.o spec_assign.o spec_procs.o spell_parser.o spells.o tedit.o utils.o weather.o zedit.o zmalloc.o   -lcrypt
act.comm.o: In function `do_write':
446: undefined reference to `IS_NPC_CLASS'
446: undefined reference to `IS_NPC_CLASS'
act.informative.o: In function `print_object_location':
1910: undefined reference to `IS_NPC_CLASS'
1912: undefined reference to `IS_NPC_CLASS'
act.informative.o: In function `list_char_to_char':
530: undefined reference to `IS_NPC_CLASS'
act.informative.c:483: more undefined references to `IS_NPC_CLASS' follow
collect2: ld returned 1 exit status
make[1]: *** [../bin/circle] Error 1
Last edit: 2 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago #8379 by JTP
Changing it to: !GET_CLASS((sub) ||

gives:

make ../bin/circle
gcc -g -O2 -Wall    -c -o act.comm.o act.comm.c
act.comm.c: In function ‘do_write’:
act.comm.c:446: warning: left-hand operand of comma expression has no effect
act.comm.c:446: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.informative.o act.informative.c
act.informative.c: In function ‘list_obj_to_char’:
act.informative.c:235: warning: left-hand operand of comma expression has no effect
act.informative.c:235: warning: left-hand operand of comma expression has no effect
act.informative.c:238: warning: left-hand operand of comma expression has no effect
act.informative.c:238: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘diag_char_to_char’:
act.informative.c:274: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘look_at_char’:
act.informative.c:322: warning: left-hand operand of comma expression has no effect
act.informative.c:329: warning: left-hand operand of comma expression has no effect
act.informative.c:341: warning: left-hand operand of comma expression has no effect
act.informative.c:341: warning: left-hand operand of comma expression has no effect
act.informative.c:348: warning: left-hand operand of comma expression has no effect
act.informative.c:348: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘list_one_char’:
act.informative.c:466: warning: left-hand operand of comma expression has no effect
act.informative.c:466: warning: left-hand operand of comma expression has no effect
act.informative.c:473: warning: left-hand operand of comma expression has no effect
act.informative.c:483: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘list_char_to_char’:
act.informative.c:530: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘look_at_target’:
act.informative.c:783: warning: left-hand operand of comma expression has no effect
act.informative.c:804: warning: left-hand operand of comma expression has no effect
act.informative.c:804: warning: left-hand operand of comma expression has no effect
act.informative.c:812: warning: left-hand operand of comma expression has no effect
act.informative.c:812: warning: left-hand operand of comma expression has no effect
act.informative.c:821: warning: left-hand operand of comma expression has no effect
act.informative.c:821: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘do_equipment’:
act.informative.c:1175: warning: left-hand operand of comma expression has no effect
act.informative.c:1175: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘do_who’:
act.informative.c:1434: warning: left-hand operand of comma expression has no effect
act.informative.c:1438: warning: left-hand operand of comma expression has no effect
act.informative.c:1484: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘do_users’:
act.informative.c:1738: warning: left-hand operand of comma expression has no effect
act.informative.c:1789: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘perform_mortal_where’:
act.informative.c:1871: warning: left-hand operand of comma expression has no effect
act.informative.c:1881: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘print_object_location’:
act.informative.c:1910: warning: left-hand operand of comma expression has no effect
act.informative.c:1912: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘perform_immort_where’:
act.informative.c:1934: warning: left-hand operand of comma expression has no effect
act.informative.c:1948: warning: left-hand operand of comma expression has no effect
act.informative.c:1961: warning: left-hand operand of comma expression has no effect
act.informative.c:1961: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘list_scanned_chars’:
act.informative.c:2894: warning: left-hand operand of comma expression has no effect
act.informative.c:2906: warning: left-hand operand of comma expression has no effect
act.informative.c: In function ‘do_affections’:
act.informative.c:3138: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.item.o act.item.c
act.item.c: In function ‘do_put’:
act.item.c:160: warning: left-hand operand of comma expression has no effect
act.item.c:160: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘get_from_container’:
act.item.c:266: warning: left-hand operand of comma expression has no effect
act.item.c:266: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘get_from_room’:
act.item.c:323: warning: left-hand operand of comma expression has no effect
act.item.c:323: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘do_get’:
act.item.c:378: warning: left-hand operand of comma expression has no effect
act.item.c:378: warning: left-hand operand of comma expression has no effect
act.item.c:389: warning: left-hand operand of comma expression has no effect
act.item.c:389: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘do_give’:
act.item.c:755: warning: left-hand operand of comma expression has no effect
act.item.c:755: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘do_wear’:
act.item.c:1416: warning: left-hand operand of comma expression has no effect
act.item.c:1416: warning: left-hand operand of comma expression has no effect
act.item.c: In function ‘do_remove’:
act.item.c:1587: warning: left-hand operand of comma expression has no effect
act.item.c:1587: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.movement.o act.movement.c
act.movement.c: In function ‘do_enter’:
act.movement.c:824: warning: left-hand operand of comma expression has no effect
act.movement.c:824: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.offensive.o act.offensive.c
act.offensive.c: In function ‘do_assist’:
act.offensive.c:64: warning: left-hand operand of comma expression has no effect
act.offensive.c: In function ‘do_listen’:
act.offensive.c:1191: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.other.o act.other.c
act.other.c: In function ‘do_steal’:
act.other.c:209: warning: left-hand operand of comma expression has no effect
act.other.c:209: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o act.social.o act.social.c
gcc -g -O2 -Wall    -c -o act.wizard.o act.wizard.c
act.wizard.c: In function ‘do_stat_room’:
act.wizard.c:573: warning: left-hand operand of comma expression has no effect
act.wizard.c:591: warning: left-hand operand of comma expression has no effect
act.wizard.c:591: warning: left-hand operand of comma expression has no effect
act.wizard.c: In function ‘do_stat_character’:
act.wizard.c:925: warning: left-hand operand of comma expression has no effect
act.wizard.c: In function ‘do_dc’:
act.wizard.c:1758: warning: left-hand operand of comma expression has no effect
act.wizard.c: In function ‘do_wiznet’:
act.wizard.c:2240: warning: left-hand operand of comma expression has no effect
act.wizard.c:2279: warning: left-hand operand of comma expression has no effect
act.wizard.c: In function ‘do_show’:
act.wizard.c:2665: warning: left-hand operand of comma expression has no effect
act.wizard.c:2763: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o aedit.o aedit.c
gcc -g -O2 -Wall    -c -o asciimap.o asciimap.c
gcc -g -O2 -Wall    -c -o ban.o ban.c
gcc -g -O2 -Wall    -c -o boards.o boards.c
gcc -g -O2 -Wall    -c -o castle.o castle.c
gcc -g -O2 -Wall    -c -o cedit.o cedit.c
gcc -g -O2 -Wall    -c -o clan.o clan.c
gcc -g -O2 -Wall    -c -o class.o class.c
gcc -g -O2 -Wall    -c -o comm.o comm.c
comm.c: In function ‘perform_act’:
comm.c:2622: warning: left-hand operand of comma expression has no effect
comm.c:2625: warning: left-hand operand of comma expression has no effect
comm.c:2650: warning: left-hand operand of comma expression has no effect
comm.c:2650: warning: left-hand operand of comma expression has no effect
comm.c:2653: warning: left-hand operand of comma expression has no effect
comm.c:2653: warning: left-hand operand of comma expression has no effect
comm.c:2657: warning: left-hand operand of comma expression has no effect
comm.c:2657: warning: left-hand operand of comma expression has no effect
comm.c:2660: warning: left-hand operand of comma expression has no effect
comm.c:2660: warning: left-hand operand of comma expression has no effect
comm.c: In function ‘act’:
comm.c:2806: warning: left-hand operand of comma expression has no effect
comm.c: In function ‘msdp_update’:
comm.c:2994: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o config.o config.c
gcc -g -O2 -Wall    -c -o constants.o constants.c
gcc -g -O2 -Wall    -c -o db.o db.c
gcc -g -O2 -Wall    -c -o dg_comm.o dg_comm.c
dg_comm.c: In function ‘sub_write_to_char’:
dg_comm.c:64: warning: left-hand operand of comma expression has no effect
dg_comm.c:73: warning: left-hand operand of comma expression has no effect
dg_comm.c:79: warning: left-hand operand of comma expression has no effect
dg_comm.c:88: warning: left-hand operand of comma expression has no effect
dg_comm.c:97: warning: left-hand operand of comma expression has no effect
dg_comm.c:109: warning: left-hand operand of comma expression has no effect
dg_comm.c:109: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o dg_db_scripts.o dg_db_scripts.c
gcc -g -O2 -Wall    -c -o dg_event.o dg_event.c
gcc -g -O2 -Wall    -c -o dg_handler.o dg_handler.c
gcc -g -O2 -Wall    -c -o dg_misc.o dg_misc.c
gcc -g -O2 -Wall    -c -o dg_mobcmd.o dg_mobcmd.c
dg_mobcmd.c: In function ‘do_mforce’:
dg_mobcmd.c:688: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o dg_objcmd.o dg_objcmd.c
gcc -g -O2 -Wall    -c -o dg_olc.o dg_olc.c
gcc -g -O2 -Wall    -c -o dg_scripts.o dg_scripts.c
gcc -g -O2 -Wall    -c -o dg_triggers.o dg_triggers.c
dg_triggers.c: In function ‘greet_memory_mtrigger’:
dg_triggers.c:173: warning: left-hand operand of comma expression has no effect
dg_triggers.c: In function ‘greet_mtrigger’:
dg_triggers.c:216: warning: left-hand operand of comma expression has no effect
dg_triggers.c: In function ‘leave_mtrigger’:
dg_triggers.c:570: warning: left-hand operand of comma expression has no effect
dg_triggers.c: In function ‘door_mtrigger’:
dg_triggers.c:597: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o dg_variables.o dg_variables.c
dg_variables.c: In function ‘find_replacement’:
dg_variables.c:506: warning: left-hand operand of comma expression has no effect
dg_variables.c:619: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o dg_wldcmd.o dg_wldcmd.c
gcc -g -O2 -Wall    -c -o fight.o fight.c
fight.c: In function ‘perform_violence’:
fight.c:1225: warning: left-hand operand of comma expression has no effect
fight.c:1225: warning: left-hand operand of comma expression has no effect
fight.c:1255: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o genmob.o genmob.c
gcc -g -O2 -Wall    -c -o genobj.o genobj.c
gcc -g -O2 -Wall    -c -o genolc.o genolc.c
gcc -g -O2 -Wall    -c -o genqst.o genqst.c
gcc -g -O2 -Wall    -c -o genshp.o genshp.c
gcc -g -O2 -Wall    -c -o genwld.o genwld.c
gcc -g -O2 -Wall    -c -o genzon.o genzon.c
gcc -g -O2 -Wall    -c -o graph.o graph.c
gcc -g -O2 -Wall    -c -o handler.o handler.c
handler.c: In function ‘get_player_vis’:
handler.c:1092: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_char_room_vis’:
handler.c:1122: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_char_world_vis’:
handler.c:1150: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_obj_in_list_vis’:
handler.c:1185: warning: left-hand operand of comma expression has no effect
handler.c:1185: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_obj_vis’:
handler.c:1217: warning: left-hand operand of comma expression has no effect
handler.c:1217: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_obj_in_equip_vis’:
handler.c:1237: warning: left-hand operand of comma expression has no effect
handler.c:1237: warning: left-hand operand of comma expression has no effect
handler.c: In function ‘get_obj_pos_in_equip_vis’:
handler.c:1257: warning: left-hand operand of comma expression has no effect
handler.c:1257: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o hedit.o hedit.c
gcc -g -O2 -Wall    -c -o house.o house.c
gcc -g -O2 -Wall    -c -o ibt.o ibt.c
gcc -g -O2 -Wall    -c -o improved-edit.o improved-edit.c
gcc -g -O2 -Wall    -c -o interpreter.o interpreter.c
gcc -g -O2 -Wall    -c -o limits.o limits.c
gcc -g -O2 -Wall    -c -o lists.o lists.c
gcc -g -O2 -Wall    -c -o magic.o magic.c
gcc -g -O2 -Wall    -c -o mail.o mail.c
gcc -g -O2 -Wall    -c -o medit.o medit.c
gcc -g -O2 -Wall    -c -o mobact.o mobact.c
mobact.c: In function ‘mobile_activity’:
mobact.c:68: warning: left-hand operand of comma expression has no effect
mobact.c:68: warning: left-hand operand of comma expression has no effect
mobact.c:98: warning: left-hand operand of comma expression has no effect
mobact.c:123: warning: left-hand operand of comma expression has no effect
mobact.c:148: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o modify.o modify.c
gcc -g -O2 -Wall    -c -o msgedit.o msgedit.c
gcc -g -O2 -Wall    -c -o mud_event.o mud_event.c
gcc -g -O2 -Wall    -c -o oasis.o oasis.c
gcc -g -O2 -Wall    -c -o oasis_copy.o oasis_copy.c
gcc -g -O2 -Wall    -c -o oasis_delete.o oasis_delete.c
gcc -g -O2 -Wall    -c -o oasis_list.o oasis_list.c
gcc -g -O2 -Wall    -c -o objsave.o objsave.c
objsave.c: In function ‘Crash_report_unrentables’:
objsave.c:809: warning: left-hand operand of comma expression has no effect
objsave.c:809: warning: left-hand operand of comma expression has no effect
objsave.c: In function ‘Crash_report_rent’:
objsave.c:829: warning: left-hand operand of comma expression has no effect
objsave.c:829: warning: left-hand operand of comma expression has no effect
objsave.c: In function ‘gen_receptionist’:
objsave.c:911: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o oedit.o oedit.c
oedit.c: In function ‘do_oasis_oedit’:
oedit.c:105: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o players.o players.c
gcc -g -O2 -Wall    -c -o prefedit.o prefedit.c
prefedit.c: In function ‘do_oasis_prefedit’:
prefedit.c:940: warning: left-hand operand of comma expression has no effect
prefedit.c:942: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o protocol.o protocol.c
gcc -g -O2 -Wall    -c -o qedit.o qedit.c
qedit.c: In function ‘do_oasis_qedit’:
qedit.c:109: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o quest.o quest.c
gcc -g -O2 -Wall    -c -o races.o races.c
gcc -g -O2 -Wall    -c -o random.o random.c
gcc -g -O2 -Wall    -c -o redit.o redit.c
redit.c: In function ‘do_oasis_redit’:
redit.c:86: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o sedit.o sedit.c
sedit.c: In function ‘do_oasis_sedit’:
sedit.c:101: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o shop.o shop.c
shop.c: In function ‘is_ok_char’:
shop.c:135: warning: left-hand operand of comma expression has no effect
shop.c: In function ‘get_slide_obj_vis’:
shop.c:432: warning: left-hand operand of comma expression has no effect
shop.c:432: warning: left-hand operand of comma expression has no effect
shop.c: In function ‘get_hash_obj_vis’:
shop.c:454: warning: left-hand operand of comma expression has no effect
shop.c:454: warning: left-hand operand of comma expression has no effect
shop.c: In function ‘shopping_list’:
shop.c:954: warning: left-hand operand of comma expression has no effect
shop.c:954: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o spec_assign.o spec_assign.c
gcc -g -O2 -Wall    -c -o spec_procs.o spec_procs.c
spec_procs.c: In function ‘npc_steal’:
spec_procs.c:635: warning: left-hand operand of comma expression has no effect
spec_procs.c: In function ‘cityguard’:
spec_procs.c:878: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o spell_parser.o spell_parser.c
gcc -g -O2 -Wall    -c -o spells.o spells.c
spells.c: In function ‘spell_locate_object’:
spells.c:294: warning: left-hand operand of comma expression has no effect
spells.c:300: warning: left-hand operand of comma expression has no effect
spells.c: In function ‘spell_heroes_feast’:
spells.c:815: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o tedit.o tedit.c
gcc -g -O2 -Wall    -c -o utils.o utils.c
utils.c: In function ‘stop_follower’:
utils.c:600: warning: left-hand operand of comma expression has no effect
utils.c: In function ‘add_follower’:
utils.c:680: warning: left-hand operand of comma expression has no effect
gcc -g -O2 -Wall    -c -o weather.o weather.c
gcc -g -O2 -Wall    -c -o zedit.o zedit.c
zedit.c: In function ‘do_oasis_zedit’:
zedit.c:114: warning: left-hand operand of comma expression has no effect
gcc -o ../bin/circle  act.comm.o act.informative.o act.item.o act.movement.o act.offensive.o act.other.o act.social.o act.wizard.o aedit.o asciimap.o ban.o boards.o bsd-snprintf.o castle.o cedit.o clan.o class.o comm.o config.o constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o dg_triggers.o dg_variables.o dg_wldcmd.o fight.o genmob.o genobj.o genolc.o genqst.o genshp.o genwld.o genzon.o graph.o handler.o hedit.o house.o ibt.o improved-edit.o interpreter.o limits.o lists.o magic.o mail.o medit.o mobact.o modify.o msgedit.o mud_event.o oasis.o oasis_copy.o oasis_delete.o oasis_list.o objsave.o oedit.o players.o prefedit.o protocol.o qedit.o quest.o races.o random.o redit.o sedit.o shop.o spec_assign.o spec_procs.o spell_parser.o spells.o tedit.o utils.o weather.o zedit.o zmalloc.o   -lcrypt

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago - 2 months 1 week ago #8380 by JTP
Ahh i had to do this:
#define INVIS_OK(sub, obj) \
 ((!AFF_FLAGGED((obj),AFF_INVISIBLE) || AFF_FLAGGED(sub, AFF_DETECT_INVIS)) && \
 (!AFF_FLAGGED((obj), AFF_HIDE) || AFF_FLAGGED(sub, AFF_SENSE_LIFE)) && \
 (!AFF_FLAGGED((obj), AFF_INVIS_TO_ANIMALS) || (IS_NPC(sub) || !GET_CLASS(sub) == CLASS_NPC_ANIMAL)))


Will that also work ?


Hmm, Maybe not. Or something else is wrong. I made a mouse an animal and aggro.

Cast invis to animals on myself, and loaded the mouse. And it attacked me. Or in what Way does invis work ? Because normal invis Will keep me safe from aggro
Last edit: 2 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago - 2 months 1 week ago #8381 by thomas
Replied by thomas on topic Invis to animals spell - need a bit help
 !GET_CLASS(sub) == CLASS_NPC...
should be
 GET_CLASS(sub) != CLASS_NPC...
Last edit: 2 months 1 week ago by thomas.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago - 2 months 1 week ago #8382 by JTP
Animals first stopped attacking when i tried this:

(!AFF_FLAGGED((obj), AFF_INVIS_TO_ANIMALS) || (GET_CLASS(sub) != CLASS_NPC_ANIMAL)))
Last edit: 2 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago #8383 by JTP
I tried giving the animal detect invis...it didnt see me..


How do i get it to see me with detect invis on ?

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #8386 by thomas
Replied by thomas on topic Invis to animals spell - need a bit help
add the check for AFF_FLAGGED(sub, AFF_DETECT_INVIS) in te same way it's used in the first check in INVIS_OK.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 months 1 week ago - 2 months 1 week ago #8389 by JTP
Let me try that
Last edit: 2 months 1 week ago by JTP.

Please Log in or Create an account to join the conversation.

Time to create page: 1.817 seconds