Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   more scripting! (https://forums.graalonline.com/forums/showthread.php?t=16408)

Andor_GP1 11-08-2001 10:31 AM

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?

BocoC 11-08-2001 11:07 AM

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;
}
}


Andor_GP1 11-08-2001 11:10 AM

ack, maybe using jail was a bad example. i mean warping a npc in NC not a player.

BocoC 11-08-2001 11:15 AM

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! =]

Andor_GP1 11-08-2001 11:20 AM

Thank You :D :D :D

Loriel 11-08-2001 08:01 PM

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...

PresShinP2P 11-08-2001 11:29 PM

'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

Andor_GP1 11-09-2001 03:40 AM

as i said above i am not warping ppl with this script only npcs resident in NC =p. thanx again Boco!

adam 11-18-2001 12:00 AM

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

Andor_GP1 11-18-2001 03:17 AM

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.

IceFire_TK 12-10-2001 12:57 AM

k

Saga2001 12-10-2001 05:32 AM

yay!
 
koolness...hey pikaz, where have u been?!?! :confused: :confused:

ShockwaveISTHEBEST 12-10-2001 06:40 AM

Boco and Saga make me feel so inferior.:D

BocoC 12-10-2001 02:24 PM

PH34R ME!

adam 12-10-2001 03:09 PM

Quote:

Originally posted by ShockwaveISTHEBEST
Boco and Saga make me feel so inferior.:D
*laughs* well aside from that.





Saga == PastAustin

very different.

I heard they are cousins or something like that though.

Andor_NPC-Admin1 12-18-2001 03:52 AM

i always thought saga was pastaustin
but pastaustin uses a different account when he goes on Andor =)


All times are GMT +2. The time now is 03:41 PM.

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