The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
Warping to saved location through warp portal
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
blurryrox
Hi guys.
I have tried to find this using search but i could not find anything.
I am trying to get my kafra to get the location of a player before tele-*porting to a place where i put my custom npc in.
and when they exit the building using the warp portal, they will go back to the location before they teleport using the kafra.
kafra_functions.txt
// Teleport Function ================================================== function script F_KafTele { getmapxy(@mapname$,@mapx,@mapy,UNITTYPE_PC); mes "[Kafra Employee]"; mes "Please choose"; mes "your destination."; next; menu @wrpC$[0],M_Wrp0, @wrpC$[1],M_Wrp1, @wrpC$[2],M_Wrp2, @wrpC$[3],M_Wrp3, @wrpC$[4],M_Wrp4, @wrpC$[5],M_Wrp5, @wrpC$[6],M_Wrp6; M_Wrp0: set @num, 0; goto L_Warp; M_Wrp1: set @num, 1; goto L_Warp; M_Wrp2: set @num, 2; goto L_Warp; M_Wrp3: set @num, 3; goto L_Warp; M_Wrp4: set @num, 4; goto L_Warp; M_Wrp5: set @num, 5; goto L_Warp; M_Wrp6: set @num, 6; L_Warp: if (@wrpC$[@num] == "Cancel") return; // Consume "Free Ticket for Kafra Transportation" if available. // Do not consume if in Guild castle if(countitem(7060) > 0 && getarg(0) != 2) delitem 7060,1; else { if (Zeny<@wrpP[@num]){ mes "[Kafra Employee]"; mes "I'm sorry, but you don't have"; mes "enough zeny for the Teleport"; mes "Service. The fee to teleport"; mes "to "+@wrpD$[@num]+" is "+@wrpP[@num]+" zeny."; close2; cutin "", 255; end; } set Zeny, Zeny-@wrpP[@num]; set RESRVPTS, RESRVPTS + (@wrpP[@num]/16); } if (@wrpD$[@num] == "Alberta") warp "alberta", 117, 56; if (@wrpD$[@num] == "Al De Baran") warp "aldebaran",168,112; if (@wrpD$[@num] == "Aldebaran") warp "aldebaran",168,112; if (@wrpD$[@num] == "Comodo") warp "comodo", 209, 143; if (@wrpD$[@num] == "Izlude") warp "izlude", 91, 136; if (@wrpD$[@num] == "Geffen") warp "geffen", 120, 39; if (@wrpD$[@num] == "Morroc") warp "morocc", 156, 46; if (@wrpD$[@num] == "Payon") warp "payon", 161, 58; if (@wrpD$[@num] == "Prontera") warp "prontera", 116, 72; if (@wrpD$[@num] == "Mjolnir Dead Pit") warp "mjolnir_02", 99, 351; if (@wrpD$[@num] == "Comodo Pharos Beacon") warp "cmd_fild07", 127, 134; if (@wrpD$[@num] == "Orc Dungeon") warp "gef_fild10", 52, 326; if (@wrpD$[@num] == "Umbala") warp "umbala", 100, 154; if (@wrpD$[@num] == "Juno") warp "yuno", 158, 125; if (@wrpD$[@num] == "^FFA500Office^000000") warp "prt_in", 50, 105; cutin "", 255; end; prt_in,53,105,0 script #officewarpout 45,1,1,{ if (getmapxy(@mapname$,@mapx,@mapy,UNITTYPE_PC)!=0) goto WarpTwo; warp "+@mapname$+","+@mapx+","+@mapy+"; end; Warptwo: warp "prontera",136,186; end; } }
Something like this, i am not sure wether the coding is correct or not, just putting this so you guys get the idea.
Edited by blurryroxLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.