now that I've fixed OnPCUseSkillEvent, its time to show off its awesomeness its usefulness
you also need 2nd plugin to do this https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/npc-duplicate.c
db/re/skill_db.conf
{
Id: 2993
Name: "CUSTOM_setpos"
Description: "CUSTOM_setpos"
MaxLevel: 3
Range: 15
SkillType: {
Place: true
}
CoolDown: 10000
},
data/luafiles514/lua files/skillinfoz/skillinfolist.lub
[SKID.CUSTOM_setpos] = {
"CUSTOM_setpos";
SkillName = "Get Position",
MaxLv = 3,
Type = "Quest",
SpAmount = { 0 },
bSeperateLv = true,
AttackRange = { 15 },
},
data/luafiles514/lua files/skillinfoz/skillid.lub
CUSTOM_setpos = 2993,
data/luafiles514/lua files/skillinfoz/skilldescript.lub
[SKID.CUSTOM_setpos] = {
"Warp to various towns",
"MAX Lv : 3 ",
"Lv 1: warp to prontera.",
"Lv 2: warp to payon.",
"Lv 3: warp to alberta.",
},
conf/import/OnPCUseSkillEvent.conf
OnPCUseSkillEvent: (
{
SkillName: "CUSTOM_setpos"
Event_Label: "qwer::Onpos"
},
)
and finally the npc script
- script asdf FAKE_NPC,2,2,{
end;
OnTouch:
switch( $@warplv ) {
case 1: warp "prontera", 156,191; break;
case 2: warp "payon", 162,233; break;
case 3: warp "alberta", 192,147;
}
end;
OnInit:
switch( $@warplv ) {
case 1: waitingroom "prontera", 0; break;
case 2: waitingroom "payon", 0; break;
case 3: waitingroom "alberta", 0;
}
end;
}
- script qwer FAKE_NPC,{
Onpos:
if ( @create_warp_npc_delay + 10 > gettimetick(2) ) {
dispbottom "cooldown";
end;
}
@create_warp_npc_delay = gettimetick(2);
.@i = .i++;
$@warplv = @useskilllv;
duplicatenpc "asdf", "asdf", .@i +"", strcharinfo(PC_MAP), @useskillx, @useskilly, DIR_SOUTH, 1_SHADOW_NPC, 2,2;
$@warplv = 0;
sleep 5000;
duplicateremove "asdf#"+ .@i;
end;
OnPCStatCalcEvent:
skill CUSTOM_setpos, 3;
end;
}
result
this screenshot is NOT tampered ... taken in-game without any photoshop or ms-paint edits