*unitkill <GID>;*unitwarp <GID>,<Mapname>,<x>,<y>;*unitattack <GID>,<Target ID>;*unitstop <GID>;*unittalk <GID>,<Text>;*unitemote <GID>,<Emote>;Okay, these commands should be fairly self explaining.For the emotions, you can look in db/const.txt for prefixes with e_PS: unitwarp supports a <GID> of zero, which causes the executor of the script to be affected. This can be used with OnTouchNPC to warp monsters:OnTouchNPC: unitwarp 0,"this",-1,-1;
Since im a beginner to this, how can i implement this? for example im using prontera map and the monster is poring. Can you do a sample?You can try to warp monsters outside by making use of the OnTouchNPC event label and unitwarp script command:
doc/script_commands.txt (unit* commands, especially unitwarp):
Code:*unitkill <GID>;*unitwarp <GID>,<Mapname>,<x>,<y>;*unitattack <GID>,<Target ID>;*unitstop <GID>;*unittalk <GID>,<Text>;*unitemote <GID>,<Emote>;Okay, these commands should be fairly self explaining.For the emotions, you can look in db/const.txt for prefixes with e_PS: unitwarp supports a <GID> of zero, which causes the executor of the script to be affected. This can be used with OnTouchNPC to warp monsters:OnTouchNPC: unitwarp 0,"this",-1,-1;
Here's an example:Since im a beginner to this, how can i implement this? for example im using prontera map and the monster is poring. Can you do a sample?
// Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0 script no_mob_walk -1,5,5,{ //end; // Uncomment this line if you use a visible sprite OnTouch: // Triggers when the defined area is walked into unitwarp 0, "this", -1, -1; // Warps invoking player/monster to random cell on the same map end;}
Here's an example:Since im a beginner to this, how can i implement this? for example im using prontera map and the monster is poring. Can you do a sample?
it warps players too? how can i make it only monsters?Code:// Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0 script no_mob_walk -1,5,5,{ //end; // Uncomment this line if you use a visible sprite OnTouch: // Triggers when the defined area is walked into unitwarp 0, "this", -1, -1; // Warps invoking player/monster to random cell on the same map end;}
My mistake; I used OnTouch instead of OnTouchNPC; here's an updated version:it warps players too? how can i make it only monsters?
// Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0 script no_mob_walk -1,5,5,{ //end; // Uncomment this line if you use a visible sprite OnTouchNPC: // Triggers when the defined area is walked into unitwarp 0, "this", -1, -1; // Warps invoking monster to random cell on the same map end;}
We use essential cookies to make this site work, and optional cookies to enhance your experience.