![]() |
special forces attacking npc with karma < 0 - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Requests (/Forum-Script-Requests) +--- Thread: special forces attacking npc with karma < 0 (/Thread-special-forces-attacking-npc-with-karma-0) |
RE: special forces attacking npc with karma < 0 - Kanibal - 02-02-2016 11:14 PM Code: ON=@NPCSeeNewPlayer RE: special forces attacking npc with karma < 0 - rastrero - 02-02-2016 11:30 PM This code is bad. U cant put timer like that on npcs or players. It will not work. Anyway u dont need to make a forchars or anything if u are going to use @npcseenewplayer Its not neccesary. The scripts we writte for u are usefull for "talk orders" or other ways, but not in this trigger. Try this better on your ranger npc script. Code: [chardef c_ranger] /your npc ranger Or this other in any npc u want.It makes npcs to attack and call rangers in area for help if they see a criminal. Code: On=@npcseenewplayer i think this is the best way to do what u want... RE: special forces attacking npc with karma < 0 - Berkley - 02-03-2016 04:02 PM thanks a lot, Kanibal and Rastrero. I'm still learning and speak the sphere language with a little akcent :-) Your help is very useful to gain in scripting. Great idea, the "help yell" script. Best regards, Lars RE: special forces attacking npc with karma < 0 - Berkley - 02-12-2016 12:11 AM it it possible to add something like this to the script? if (<karma> < -799) && ->>not tamed by anyone<<- Best regards, Lars RE: special forces attacking npc with karma < 0 - Berkley - 02-16-2016 06:53 AM i tried out this but id does not work: if ((<karma> < -799) && (<ACTPRI> = null)) if karma less -799 and <ACTPRI> is not existing best regards, Lars RE: special forces attacking npc with karma < 0 - Kanibal - 02-16-2016 07:06 AM Try this: Code: if ((<karma> < -799) && (!<owner>)) RE: special forces attacking npc with karma < 0 - Berkley - 02-16-2016 07:59 AM (02-16-2016 07:06 AM)Kanibal Wrote: Try this: Perfect! many thanks RE: special forces attacking npc with karma < 0 - Khaos - 02-17-2016 05:03 PM The original post asked for rangers to attack monsters, not players. Also @SeeNewPlayer?! It should be @NPCSeeNewPlayer. Just put this on your ranger's. Attach it in their core code or use events. Whichever you choose. Technically this is NOT what you asked for. If you get into more detail I can script what you originally wanted. You asked for Ranger's WITHIN Yell distance to attack for your char. This script works a bit different. This will fire off with a ranger in a sector that is not asleep. It will attack anything -800 or worse in karma and call for aid of other rangers within yell distance to attack that same target. Code: // This fires when a Mobile looks at ANY character (not just a player). Code: [speech spk_ranger_aid] I think this is more what you were looking for. Add this via tspeech. When the NPC's hears a player yell for HELP. It will attack the first EVIL NPC within yell distance. This can be refined more to store the players position and ranger's and only attack things within that distance. Though, we are getting awfully technical at that point. RE: special forces attacking npc with karma < 0 - Khaos - 02-18-2016 09:12 AM Fixed a typo in the for call. I was too tired last night writing this. Sorry ^_^ RE: special forces attacking npc with karma < 0 - Berkley - 02-25-2016 04:12 AM (02-17-2016 05:03 PM)Khaos Wrote: The original post asked for rangers to attack monsters, not players. Also @SeeNewPlayer?! It should be @NPCSeeNewPlayer. Very nice! I think this works fine on my server. Many thanks for this. Best regards, Lars |