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
  #16  
Old 01-26-2004, 11:34 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by ZeLpH_MyStiK

They both work -.- Try it out before you tell someone incorrect information please.

Fine, make a level..
a NPC:

if (timeout||playerenters) {
this.msg=123456;
unset this.msg;
timeout=0.05;
message #v(this.msg);
}

Try that.
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #17  
Old 01-26-2004, 11:41 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Quote:
Originally posted by mhermher



Fine, make a level..
a NPC:

if (timeout||playerenters) {
this.msg=123456;
unset this.msg;
timeout=0.05;
message #v(this.msg);
}

Try that.
He is setting a string, not a variable.
__________________
-Kjetil Valen
Reply With Quote
  #18  
Old 01-26-2004, 11:53 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
setstring this.word,Blah;
unset this.word;

message #s(this.word);

Will still message Blah.
Reply With Quote
  #19  
Old 01-27-2004, 02:24 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by R0bin
setstring this.word,Blah;
unset this.word;

message #s(this.word);

Will still message Blah.
Not when I tried it x.x think about it, here's the logic:
if you do setstring clientr.test,hi; and you open the attributes, the string is shown in the flags section therefore it can be unset. If you still dont believe me, try this, its a weapon called Test:
NPC Code:

if (actionserverside) {
putnpc2 playerx,playery,{
if (created) message I'm here;
if (playerchats) {
if (strequals(#c,set)) setstring this.test,hi;
if (strequals(#c,unset)) unset this.test;
if (strequals(#c,say)) message #s(this.test);
}
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Test,;
}


just say "set" "say" you'll see the npc say hi
then say "unset" "say" the npc will then say nothing b/c this.test is no longer there
__________________

Last edited by ZeLpH_MyStiK; 01-27-2004 at 03:06 AM..
Reply With Quote
  #20  
Old 01-27-2004, 03:21 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by mhermher



Fine, make a level..
a NPC:

if (timeout||playerenters) {
this.msg=123456;
unset this.msg;
timeout=0.05;
message #v(this.msg);
}

Try that.
NPC Code:

if(created)
set flag name;



Use unset flag name in that case, not with variables or strings :P
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #21  
Old 01-27-2004, 10:31 AM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by osrs


NPC Code:

if(created)
set flag name;



Use unset flag name in that case, not with variables or strings :P
That's what i was saying..
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #22  
Old 01-27-2004, 05:15 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
geez lame people.
find another thread. this one has already been answered.







and to delete a string use setring

NPC Code:

setstring <string>,;

__________________
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
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:13 PM.


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