Originally posted by [b]Mooka[/b]
[quote name='scripts_commands.txt']
*unitwalk <GID>,<x>,<y>;
*unitwalk <GID>,<mapid>;
[spoiler]
This is one command, but can be used in two ways. If only the first argument is given,
the unit whose GID is given will start walking towards the map with the given mapid
(we believe these are the map-indexes found in db/map_index.txt).
When 2 arguments are passed, the given unit will walk to the given x,y coordinates on
the map where the unit currently is.
[/spoiler]
Example(s):
//Will move/walk the poring we made to the coordinates 150,150
unitwalk .GID,150,150;
[b][color=#DAA520][1] [/color][/b][color=#ff0000][b]//Will [u]move the poring[/u] towards alberta (if my assumed map-indexes are correct).[/b][/color]
[b]unitwalk .GID, 3;[/b]
---------------------------------------
*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: [b][color=#daa520][2][/color][/b] [b]unitwarp supports a <GID> of zero[/b], which causes the executor of the script to be affected. [b][color=#DAA520][3] [/color][/b][b]This can be used with OnTouchNPC to warp monsters:[/b]
OnTouchNPC:
unitwarp 0,"this",-1,-1;
[/quote]
[b][color=#DAA520][1][/color][/b] I tried three methods to catch a likely MobID and none worked, i'll explain below. (It's impossible obtain a MobID?)
[b][color=#DAA520][2] [/color][/b]I test with my char, and nothing happens. (unittalk 0, "Hello"

.
[b][color=#DAA520][3] [/color][/b]Nothing happens. (i think this happens because bug on [2])
[b]Methods which i have used to get a possible MobID.[/b]
1. Take the MobID with GM Cloth and input this ID on npc to make an action.
[img]https://dl.dropbox.com/u/38027321/img/screenrAthena002.jpg[/img]
Script:
[CODE]
prontera,155,164,5 script TouchTest 802,5,5,{
monster("prontera", 155, 165, "--ja--", 1001, 1);
end;
OnTouchNPC:
unittalk 0, "sucess";
end;
}
[/CODE]
2. With OnTouchNPC, but not happens, as i said before.
[img]https://dl.dropbox.com/u/38027321/img/screenrAthena004.jpg[/img]
Script:
[CODE]
prontera,155,150,5 script MoveTest 801,{
input @mobid;
unittalk @mobid, "sucess";
}[/CODE]
3. Verify if anything happens with the Monster command return value. (nothing happens)
[CODE]
prontera,152,150,5 script Test 800,{
dispbottom "#"+@mobid;
set @mobid, monster("prontera", 150, 150, "--ja--", 1001, 1);
unittalk @mobid, "sucess";
}[/CODE]
This post has been edited by
Mooka
on Aug 22, 2012 20:41