Portal Skill

I've test this script now and the problem is,

that the part for the waitingroom aren't attached to the player.
So, if I want to create own warps by players like @memo, the name can't be shown.

Like :
OnInit:
    switch( $@warplv ) {
    case 1: 
        waitingroom #memo1$, 0; 
        break;

So yea.. atm the warps called by OnPCUseSkillEvent aren't rly static. Only if you want to use the waitingroom stuff.
Any solutions for this? 

Btw, isn't there a way to use the "real" warp skill (AL_Warp)?
Don't know if it's possible to use the npc_duplicate in skill.c by this part:
 

group->val1 = (group->val1<<16)|(short)0;
// record the destination coordinates
group->val2 = (x<<16)|y;
group->val3 = map_index;


or use the status.memo_point
 

Code:
mapindex_id2name(sd->status.memo_point[i].map)
sd->status.memo_point[i].x,
sd->status.memo_point[i].y);
 
Last edited by a moderator:
long time i search for this idea...i want like this too...around 2004-2007 some official server botter set the acolyte as the warper...when we deal some price of zeny the acolyte will use memo skill to selected destination...bot will create chat room and say 150z pay_dun/100z orc_dun/120z hidden_temple..when we paid the amount they automatically open the portal...

 
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

 
Back
Top