Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-05-2002, 11:05 AM
CrimsonLotus9838 CrimsonLotus9838 is offline
Registered User
Join Date: Jun 2002
Location: Newbie House
Posts: 10
CrimsonLotus9838 is on a distinguished road
Post Admin Chat Commands...

Just recently I've attempted to script 3 admin chat commands like
- warpto x y levelname
- warpto accountname
- teleport accountname actionnumber
- update level levelname

the warpto x y levelname is easy:

if(playerenters) toweapons *warpto x y levelname;
if(playerchats && indexof(warpto,#c)==0){
tokenize #c;
setstring warptolevel,#t(3);
playerx=strtofloat(#t(1));
playery=strtofloat(#t(2));
setlevel #s(warptolevel);
}

I think most ppl figured that one out, heh, but the commands
- warpto accountname
- teleport accountname actionnumber
- update level levelname
just stumps me. How <i>do</i> you get another player to warp, that I cannot find out. Anyone have a clue? x.x
__________________
It feels like little guards are gonna come up when ur on trial mode and say something like only p2p accounts can hump the walls! Now that wouldn't be good : /
Reply With Quote
  #2  
Old 08-05-2002, 11:15 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Is this for NPC Server? It would be a lot easier to do.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #3  
Old 08-05-2002, 12:12 PM
Kyle_2002 Kyle_2002 is offline
Banned
Join Date: Aug 2002
Location: Where do you think?
Posts: 160
Kyle_2002 is on a distinguished road
re-vamped

NPC Code:

if(playerchats && startswith(warpto,#c)&&strequals(staff,#g)){
tokenize #c;
setstring warptolevel,#t(3);
setleve2 strtofloat(#t(1)),strtofloat(#t(2)),#s(warptolevel );
}



Just substute "staff" for what staff would get the NPC.
Reply With Quote
  #4  
Old 08-05-2002, 12:25 PM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
Quote:
Originally posted by Kyle_2002
re-vamped

NPC Code:

if(playerchats && startswith(warpto,#c)&&strequals(staff,#g)){
tokenize #c;
setstring warptolevel,#t(3);
setleve2 strtofloat(#t(1)),strtofloat(#t(2)),#s(warptolevel );
}



Just substute "staff" for what staff would get the NPC.
NPC Code:

if (playerchats && startswith(warpto,#c) && strequals(Staff,#g)){
tokenize #c;
setstring warptolevel,#t(3);
setlevel2 strtofloat(#t(1)),strtofloat(#t(2)),#s(warptolevel );
}



I fixed spelling error
Reply With Quote
  #5  
Old 08-05-2002, 12:42 PM
Kyle_2002 Kyle_2002 is offline
Banned
Join Date: Aug 2002
Location: Where do you think?
Posts: 160
Kyle_2002 is on a distinguished road
what did I miss spell?
Reply With Quote
  #6  
Old 08-05-2002, 08:37 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
NPC Code:

//updatelevel
if (playerchats && strequals(#c,update level)) {
sendtorc /updatelevel #L;
}

//warpto player & warpto x y level
if (playerchats && startswith(warpto,#c)) {
tokenize #c;
if (tokenscount==2) {
with (getplayer(#e(7,-1,#c))) {
setstring this.tlevel,#L;
this.tx = playerx;
this.ty = playery;
}
with(getplayer(#a)) {
setlevel2 #s(this.tlevel),this.tx,this.ty;
}
} else if (tokenscount==4) {
setlevel2 #t(3),#t(1),#t(2);
} else if (tokenscount!=2 && tokenscount!=4) {
setplayerprop #c, correct format: warpto x y level;
}
}



as for the teleport, i dont know what the actionnumber is so, Xx
__________________
[signature]insert here[/signature]
Reply With Quote
  #7  
Old 08-05-2002, 10:26 PM
CrimsonLotus9838 CrimsonLotus9838 is offline
Registered User
Join Date: Jun 2002
Location: Newbie House
Posts: 10
CrimsonLotus9838 is on a distinguished road
Teleport CrimsonLotus9838 2 <-- warps me to the GC, usually gcwaitingroom.graal :o)
Teleport CrimsonLotus9838 4 <-- warps me to somewhere else, i.e. house3newbie.graal, gcarena1.graal

btw people really amaze with the new commands, theres none of that "indexOf", "getplayer", and "startswith" when I left Graal during 1.45...(I came back after Infantry became p2p)
__________________
It feels like little guards are gonna come up when ur on trial mode and say something like only p2p accounts can hump the walls! Now that wouldn't be good : /
Reply With Quote
  #8  
Old 08-05-2002, 10:27 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
it's
"strequals(#g,guildname))"
and
"startswith(word,#whatever))"
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #9  
Old 08-05-2002, 10:33 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by CrimsonLotus9838
Teleport CrimsonLotus9838 2 <-- warps me to the GC, usually gcwaitingroom.graal :o)
Teleport CrimsonLotus9838 4 <-- warps me to somewhere else, i.e. house3newbie.graal, gcarena1.graal

btw people really amaze with the new commands, theres none of that "indexOf", "getplayer", and "startswith" when I left Graal during 1.45...(I came back after Infantry became p2p)
why dont you just warpto ??
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 08-05-2002, 10:36 PM
CrimsonLotus9838 CrimsonLotus9838 is offline
Registered User
Join Date: Jun 2002
Location: Newbie House
Posts: 10
CrimsonLotus9838 is on a distinguished road
No, I don't say "teleport"

The GC/GP/LAT/FAQ says the "teleport" and makes me warp to them -or- get warped away from the event.
__________________
It feels like little guards are gonna come up when ur on trial mode and say something like only p2p accounts can hump the walls! Now that wouldn't be good : /
Reply With Quote
  #11  
Old 08-06-2002, 04:21 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
What you want is an Admin NPC/Loriel's RC/Whatever other names may exist for what is best described as the script that does stuff when a staff member says "control command account params separated by spaces"


They're not hard to do if you have an NPC server.
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #12  
Old 08-06-2002, 07:40 AM
Andor_RC14 Andor_RC14 is offline
Registered User
Join Date: Jan 2002
Location: U.S.A - Ohio
Posts: 101
Andor_RC14 is on a distinguished road
Send a message via ICQ to Andor_RC14 Send a message via AIM to Andor_RC14 Send a message via Yahoo to Andor_RC14
I still cant figure out a way to get the level from the player you call to warpto. I can get the x and y right but I always end up with the level I am in. Is there anyway to warp2 accountname without rc?
__________________


Statistics show that 60% of all statistics are made-up
Manager of Norin.
EX Co-Manager of Bravo Online.
Reply With Quote
  #13  
Old 08-06-2002, 08:09 AM
Cybnext Cybnext is offline
Registered User
Join Date: Jun 2002
Posts: 100
Cybnext is on a distinguished road
Quote:
Originally posted by Andor_RC14
I still cant figure out a way to get the level from the player you call to warpto. I can get the x and y right but I always end up with the level I am in. Is there anyway to warp2 accountname without rc?
When you set the string for the level, are you using #L or #F?
Reply With Quote
  #14  
Old 08-06-2002, 11:15 AM
CrimsonLotus9838 CrimsonLotus9838 is offline
Registered User
Join Date: Jun 2002
Location: Newbie House
Posts: 10
CrimsonLotus9838 is on a distinguished road
Quote:
They're not hard to do if you have an NPC server.
Well I *don't* have an NPC server, so it'd be hard to do : /
__________________
It feels like little guards are gonna come up when ur on trial mode and say something like only p2p accounts can hump the walls! Now that wouldn't be good : /
Reply With Quote
  #15  
Old 08-07-2002, 06:01 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
i dunno but crim has a piss-tight sig!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.