Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-08-2001, 10:31 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
more scripting!

Ok! heres my question, i have a npc in NC, i want to have an npc that changes lvl depending on what i say (i know all the tokenize non-sence so to make it easy...) so how would i simply script it so when i say "jail" it would warp to jail.graal?
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #2  
Old 11-08-2001, 11:07 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
Weapon script:
NPC Code:

if (playerchats) {
if (startswith(jail,#c)) {
tokenize #c;
setstring this.paccount,#t(1);
triggeraction 0,0,serverJailPlayer,#s(this.paccount);
}
}


Control-NPC:
NPC Code:

if (actionserverJailPlayer) {
with (getplayer(#p(0))) {
setlevel2 jail.graal,30,30;
}
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #3  
Old 11-08-2001, 11:10 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
ack, maybe using jail was a bad example. i mean warping a npc in NC not a player.
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #4  
Old 11-08-2001, 11:15 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
Oooooooooohhhhhhh........
NPC Code:

// say /warp level x y
if (playerchats) {
if (startswith(/warp,#c)) {
tokenize #c;
if (tokenscount==4) {
setstring this.warplevel,#t(1);
this.warpx=strtofloat(#t(2));
this.warpy=strtofloat(#t(3));
warpto #s(this.warplevel),#v(this.warpx),#v(this.warpy);
}
}
}



There youz goez Pikaz! =]
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #5  
Old 11-08-2001, 11:20 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
Thank You
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #6  
Old 11-08-2001, 08:01 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Better is probably...
NPC Code:
if (created || timeout) {
with (getplayer(account)) {
if (startswith(warpnpc,#c)) continue;
tokenize #c;
warpto #t(3),strtofloat(#t(1)),strtofloat(#t(2));
}
timeout = 0.5;
}

Or something similar to this...
  #7  
Old 11-08-2001, 11:29 PM
PresShinP2P PresShinP2P is offline
Registered User
Join Date: Oct 2001
Location: Screw it
Posts: 84
PresShinP2P is on a distinguished road
Send a message via AIM to PresShinP2P
'warpto' warps the NPC?

if this is true, couldnt I arm an NPC with a looping timeout and warp it to a level to give people stuff

if (playerenters){
timeout=.05;
warpto thisthat.graal,32,32;
}
if (timeout){
toweapons Test Weapon;
timeout=.05;
}

would this infact warp the NPC to thisthat, then give everyone in that room a weapon
__________________
President Shinra
  #8  
Old 11-09-2001, 03:40 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
as i said above i am not warping ppl with this script only npcs resident in NC =p. thanx again Boco!
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #9  
Old 11-18-2001, 12:00 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by PresShinP2P
'warpto' warps the NPC?

if this is true, couldnt I arm an NPC with a looping timeout and warp it to a level to give people stuff

if (playerenters){
timeout=.05;
warpto thisthat.graal,32,32;
}
if (timeout){
toweapons Test Weapon;
timeout=.05;
}

would this infact warp the NPC to thisthat, then give everyone in that room a weapon

try addweapon
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
  #10  
Old 11-18-2001, 03:17 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
n/m you guys still don't get the point on this one =p(no wepaon needed! not warping a player ut a database npc) i got i worked out anyway.
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #11  
Old 12-10-2001, 12:57 AM
IceFire_TK IceFire_TK is offline
Banned
Join Date: Nov 2001
Location: O' Canada
Posts: 375
IceFire_TK is on a distinguished road
Send a message via AIM to IceFire_TK Send a message via Yahoo to IceFire_TK
k
  #12  
Old 12-10-2001, 05:32 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
yay!

koolness...hey pikaz, where have u been?!?!
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #13  
Old 12-10-2001, 06:40 AM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
Boco and Saga make me feel so inferior.
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
  #14  
Old 12-10-2001, 02:24 PM
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
PH34R ME!
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #15  
Old 12-10-2001, 03:09 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by ShockwaveISTHEBEST
Boco and Saga make me feel so inferior.
*laughs* well aside from that.





Saga == PastAustin

very different.

I heard they are cousins or something like that though.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
 


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 11:58 AM.


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