Thread: Account Warping
View Single Post
  #9  
Old 07-23-2001, 08:26 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Make a system NPC. In it, use this code:
NPC Code:

if (created || playerenters) {
toweapons -System;
timeout=0.1;
}
if (timeout && isweapon)
CheckForWarp();
DoWhateverSystemStuffYouWant();
timeout=0.1;
}
function CheckForWarp() {
if (strequals(#a,#s(server.warp_player))) {
setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));
setstring server.warp_player,;
}
}


Now, for the NPC. Format: warp <account> <level> <x> <y>
NPC Code:

if (playerchats && startswith(warp,#c)) {
tokenize #c;
if (tokenscount==4) {
setstring server.warp_player,#t(1);
setstring server.warp_level,#t(2);
setstring server.warp_x,#t(3);
setstring server.warp_y,#t(4);
}
}


Try that. I just now made that up, so I haven't debugged it.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote