ragexe 0 Posted May 31, 2017 monster(.@map$, 120, 130, "Dracula", 1389, 1); 'Dracula = $@mobid[0]; getunitdata 'Dracula,.@bossdata; .@x = .@bossdata[6]; .@y = .@bossdata[7]; monster instance_mapname("1@dra"),.@x,.@y,"",1389,1; 'draculaclone = $@mobid[0]; setunitdata 'draculaclone, 29, 1; unitskilluseid 'draculaclone, 85, 1; if(rand(1,20) > 10) { unittalk 'Dracula,"!!!!!!"; unitskillusepos 'draculaclone,85,10,.@x,.@y; for(.@i = 0; .@i < 2; .@i ++) { unitskillusepos 'draculaclone,89,10,.@x+.@i+5,.@y+.@i+5; unitskillusepos 'draculaclone,89,10,.@x-.@i-5,.@y-.@i-5; } } I'm trying to create custom instance, but unitskilluseid & unitskillusepos just cast(just magic circle) without give any magic effect & damage, no error in map server Quote Share this post Link to post Share on other sites
0 meko 170 Posted May 31, 2017 your .@x and .@y do not get the right data because you call getunitdata() improperly: you have to specify the data type, which would be UDT_MAPIDXY in your case see https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L9636 Quote Share this post Link to post Share on other sites
0 ragexe 0 Posted May 31, 2017 (edited) your .@x and .@y do not get the right data because you call getunitdata() improperly: you have to specify the data type, which would be UDT_MAPIDXY in your case see https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L9636 hi thanks for answer, but can you give example to use that? .@x = UDT_MAPIDXY[1]? .@y = UDT_MAPIDXY[2]? Edited May 31, 2017 by ragexe Quote Share this post Link to post Share on other sites
0 meko 170 Posted May 31, 2017 If all you want is get the location then getmapxy() works just fine, no need to use more "advanced" commands such as getunitdata Quote Share this post Link to post Share on other sites
0 ragexe 0 Posted June 1, 2017 (edited) If all you want is get the location then getmapxy() works just fine, no need to use more "advanced" commands such as getunitdata yea thanks work now Edited June 1, 2017 by ragexe Quote Share this post Link to post Share on other sites
I'm trying to create custom instance, but unitskilluseid & unitskillusepos just cast(just magic circle) without give any magic effect & damage, no error in map server
Share this post
Link to post
Share on other sites