Thread: Warpto System
View Single Post
  #4  
Old 02-21-2005, 03:09 AM
TESTRETIS TESTRETIS is offline
Zvarri!
TESTRETIS's Avatar
Join Date: Oct 2003
Posts: 970
TESTRETIS has a spectacular aura about
I already fixed it up before falco, Just didnt have time to post it.

Anyway Here it is, fixed up
NPC Code:

//NPC by Ben Rain

if (actionserverside) {
if (strequals(#p(0),requestList)) {
setstring this.accounts,acc1,acc2,; // Accounts here
triggeraction 0,0,clientside,Staff/Warpto,"#s(this.accounts)";
}
if (lindexof(#a,this.accounts) > -1) {
if (strequals(#p(0),ul)) {
sendtorc /updatelevel #p(1);
setplayerprop #c,Sucessful!;
}
if (strequals(#p(0),warpto)) {
setlevel2 #p(3),strtofloat(#p(1)),strtofloat(#p(2));
}
if (strequals(#p(0),warptoplayer)) {
with (getplayer(#p(1))) {
setstring this.level,#F;
this.x = playerx;
this.y = playery;
}
setlevel2 #s(this.level),this.x,this.y;
}
}
}

//#CLIENTSIDE
if (created) triggeraction 0,0,serverside,Staff/Warpto,requestList;
if (actionclientside) setstring this.accounts,#p(0);
if (playerchats) {
if (startswith(warpto,#c)) {
tokenize #c;
if (tokenscount > 2) {
if (lindexof(#a,this.accounts) > -1) {
triggeraction 0,0,serverside,Staff/Warpto,warpto,#t(1),#t(2),#t(3);
}
}
else if (tokenscount == 2) {
if (lindexof(#a,this.accounts) > -1) {
triggeraction 0,0,serverside,Staff/Warpto,warptoplayer,#t(1);
}
}
}
else if (strequals(#c,update level)) {
if (lindexof(this.accounts,#a) > -1) {
triggeraction 0,0,serverside,Staff/Warpto,ul,#L,;
}
}
}

Reply With Quote