since there are people bumping this thread, and a lot of stuffs has changed since then, I decided to redo this again
1st, stupid patch because of
this commit
src/common/mmo.h | 2 +-
src/map/skill.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common/mmo.h b/src/common/mmo.h
index e4b5a8bd5..6d029228a 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -234,7 +234,7 @@
#define MAX_CART 100
#endif
#ifndef MAX_SKILL_DB
-#define MAX_SKILL_DB 1314 ///< Maximum number of skills in the skill DB (compacted array size)
+#define MAX_SKILL_DB 1319 ///< Maximum number of skills in the skill DB (compacted array size)
#endif
#ifndef MAX_SKILL_ID
#define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID
diff --git a/src/map/skill.c b/src/map/skill.c
index c2a336d7e..f827eb21f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -97,6 +97,7 @@ static const struct {
{ HLIF_HEAL, MH_VOLCANIC_ASH },
{ MS_BASH, MER_INVINCIBLEOFF2 },
{ EL_CIRCLE_OF_FIRE, EL_STONE_RAIN },
+ { 2991, 2995 },
{ GD_APPROVAL, GD_DEVELOPMENT },
CUSTOM_SKILL_RANGES
};
then .... as usual, using latest
OnPCUseSkillEvent ver1.5 and
dastgir's duplicate npc
db/re/skill_db.conf
{
Id: 2995
Name: "CREATE_PORTAL"
Description: "CREATE_PORTAL"
MaxLevel: 3
Range: 15
SkillType: {
Place: true
}
CoolDown: 10000
Event_Label: "qwer::Onpos"
},
data/luafiles514/lua files/skillinfoz/skillinfolist.lub
[SKID.CREATE_PORTAL] = {
"CREATE_PORTAL";
SkillName = "Create Portal",
MaxLv = 3,
Type = "Quest",
SpAmount = { 0 },
bSeperateLv = true,
AttackRange = { 15 },
},
data/luafiles514/lua files/skillinfoz/skillid.lub
CREATE_PORTAL = 2995
data/luafiles514/lua files/skillinfoz/skilldescript.lub
[SKID.CREATE_PORTAL] = {
"Warp to various towns",
"MAX Lv : 3 ",
"Lv 1: warp to prontera.",
"Lv 2: warp to payon.",
"Lv 3: warp to alberta.",
},
npc script
- script asdf FAKE_NPC,2,2,{
dispbottom strnpcinfo(0);
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 qwerty FAKE_NPC,{
Onpos:
if (@create_warp_npc_delay + 10 > gettimetick(2)) {
dispbottom "cooldown";
end;
}
@create_warp_npc_delay = gettimetick(2);
.@i = ++.counter;
$@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; // Dastgir needs to fix this
disablenpc "asdf#"+ .@i;
end;
OnPCStatCalcEvent:
skill CREATE_PORTAL, 3;
end;
}
hmmm ..... its kinda working in theory but dastgir's .... plugin is broken currently
1. duplicateremove can cause server crash
2. OnTouch doesn't seem to work ...
I think someone needs to fix duplicatenpc plugin ....
..... meh lots of problem of this mod, not in the mood to do this so push this aside ...... for now