[Request]AutoWarp Script

08/27/2011 17:40 merryploughbhoy#1
Hello my request is can some of you pro scripters make a script so that when anyone hits lvl 10 on trainee island that you will be auto warped to horizen,either tele npc or even jobchanger npc.

The reason I ask this is that you are unable to turn-in completed quests(although u can do the 'meet the oracle' one in guild npc rondo and amazingly it gives exp) on my server.

I did some searching here and also on arcadia dev and all i could find was another users quest problem same as mine, but the dude was told it had something to do with his pc specs ie Memory.

My Rig should handle the server, here are the Specs

CPU: 2x 3.6Ghz Intel Xeon
Memory: 4GB DDR2 Memory
Mainboard: Asus NTC-D
OS: Vista 32-bit

Thanks in Advance.
08/27/2011 20:53 Ranma014#2
look at your on_player_level_up.lua
you will see
"if lv == 5 then"
Jus above that paste:
Code:
if lv == 10 then
	warp(Xpos,Ypos)
end
get those coordinates yourself. Go where you waynt them to teleport and type /position in chat. use those coodinates, ignore layer.
08/27/2011 21:00 ismokedrow#3
Quote:
Originally Posted by Ranma014 View Post
look at your on_player_level_up.lua
you will see
"if lv == 5 then"
Jus above that paste:
Code:
if lv == 10 then
    warp(Xpos,Ypos)
end
get those coordinates yourself. Go where you waynt them to teleport and type /position in chat. use those coodinates, ignore layer.
If my knowledge of LUA is correct and from past experience of setting level based triggered.

e.g.

function trigger_warp()
level = gv("level")
if level = 10
warp(x, y)
end

The above will trigger but only after the character has achieved level 10 and re-logged.

I may be incorrect however.


08/27/2011 21:25 Ranma014#4
Quote:
Originally Posted by ismokedrow View Post
function trigger_warp()
local level = gv("level")
if level == 10 then
warp(x, y)
end
end
Hmm isnt the on level up lua called everytime you level up? so a simple if should do the trick, like i poste.

PS: I fixed your typo and beefed up the function.
08/27/2011 21:29 merryploughbhoy#5
Quote:
Originally Posted by Ranma014 View Post
look at your on_player_level_up.lua
you will see
"if lv == 5 then"
Jus above that paste:
Code:
if lv == 10 then
	warp(Xpos,Ypos)
end
get those coordinates yourself. Go where you waynt them to teleport and type /position in chat. use those coodinates, ignore layer.
Thanks Ranma it works a treat xD
08/27/2011 21:34 ismokedrow#6
Quote:
Originally Posted by Ranma014 View Post
Hmm isnt the on level up lua called everytime you level up? so a simple if should do the trick, like i poste.

PS: I fixed your typo and beefed up the function.
Eh can't get it all right :P Kudos mate.