Garrulous Glaahk Poit Posted September 15, 2005 Share Posted September 15, 2005 Hey I was just wondering about the possiblity of imbuing an item with either a script or function that would give the effect of invisibility for a player. I've considered trying to toy with the set_town_hostile calls so that when the cloak or charm is equipped all monsters would become neutral. This is all just theory at the moment but I'm wondering if anyone else has either thought of a similar idea or achieved this effect. -cheers Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted September 15, 2005 Share Posted September 15, 2005 I remember someone mentioning attempting something like this in the very early days of these forums, by a fairly similar method to what you suggest. I've no idea how far they got with it. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 15, 2005 Share Posted September 15, 2005 I have made an item which gives an 'invisibility' effect; it sets an SDF, and then I have swapped basicnpc for an altered copy which makes creatures forget their target if the target is in the party and the SDF is set. It seems to work fine, and can give more complex behaviors, such as, if you are invisible and hit a hostile creature, it will notice and attack you. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Poit Posted September 17, 2005 Author Share Posted September 17, 2005 Wow that's great, I'm glad somebody managed to do it. I'll have a fool round later and see if i can come up with something similar. You should post that on the script codex or something, see if anyones interested. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 17, 2005 Share Posted September 17, 2005 I could, but the trouble is that the code is divided into a number of pieces in different scripts (basicnpc, the scenario script START_STATE and in another scenario script state), and I also added another feature to my basicnpc which adds a lot of code and isn't fully debugged yet. The important part is in basicnpc, where for instance I changed: Code: if (dist_to_char(get_target()) <= 16) set_state(3); else set_target(ME,-1);} to being: Code: if ((dist_to_char(get_target()) <= 16) && ((get_flag(299,26) == 0) || (char_in_group(get_target(),0) == 0))){ set_state(3);}else set_target(ME,-1); where flag(299,26) is my invisiblity counter flag. Link to comment Share on other sites More sharing options...
Recommended Posts