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 10-23-2001, 05:27 AM
iceman8832 iceman8832 is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 121
iceman8832 is on a distinguished road
this.

hello. i asked how to script this. a while ago. I know how to script but not that well. i get the just of it. could someone explain some more complex stuff too me as simply as possible for instance this., variables, and strings. Could you include an example script using a lot of complex commands and explaining each and every one of those commands. please put it very simply. thanks.
Reply With Quote
  #2  
Old 10-23-2001, 05:41 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
variables:
there are 2 types of variables
1. the global (for every NPC in the room)
2. this. variables for only one NPC

variables are used for numbers and stuff like this...
example

if(playertouchsme){
a=1+3;
message #v(a);
}

if u touch him he will say 4 =)

so this variables:

if u have an NPC which uses normal variables (without this) it is set for all npcs in the level
example:
1. NPC:
if(playertouchsme){
a=1+3;
message #v(a);
}

2. NPC
if(playertouchsother){
message #v(a);
}

so if u touch the 1. NPC both will say 4

if u use this.variables
example:
1. NPC:
if(playertouchsme){
this.a=1+3;
message #v(a);
}

2. NPC
if(playertouchsother){
message #v(this.a);
}

then if u touch the first NPC it will say 4 but the second will say 0 (it's what every variable is before u set it)

so strings:
if u wanna save text or numbers for every level (for example a bank) u have to use strings
the are set with:
setstring stringname,number or text;

for example 3 NPCs in 2 differnet levels
1. NPC:
if(playertouchsme){
message ouch;
setstring ouch, fred;
}

2. NPC:
if(playertouchsme){
message ouch;
setstring ouch, Karl;
}

3. NPC:
if(playertouchsme){
message You touched #s(ouch);
}

the 1. and 2. NPC are in the 1. Level the 3. NPC is in the 2. level
1. NPCs name: fred
2. NPCsname Karl

so if u touch fred in the first level and then u go into the second level and touches the NPC he will say
You touched fred

the #s() is necessary if u want to handle with strings

If u wanna clear a string use:
setstring stringname,;
__________________
No Webhost at the moment
Reply With Quote
  #3  
Old 10-23-2001, 08:12 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
wow you must of been REALLY bored to do that lol
Reply With Quote
  #4  
Old 10-23-2001, 08:16 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
U got it, if u are waiting for an answer of birdbird u must have many to do
__________________
No Webhost at the moment
Reply With Quote
  #5  
Old 10-23-2001, 08:18 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
if you put that bottom pic in front of the card you can save space on ur sig
Reply With Quote
  #6  
Old 10-23-2001, 08:20 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Ummm something works wrong with that pic X_X
---
nope got it =D
__________________
No Webhost at the moment
Reply With Quote
  #7  
Old 10-23-2001, 08:23 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by TDO2000
Ummm something works wrong with that pic X_X
---
nope got it =D
kewl much better
Reply With Quote
  #8  
Old 10-23-2001, 08:26 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
took your Athlon pIc
Yeah to all Intel users here
AMD IS MUCH BETTER AND MUCH CHEAPER UND MUCH FASTER SO U ARE AN IDIOT IF U BUY INTEL MUAHAHAHAHAHAHA
__________________
No Webhost at the moment
Reply With Quote
  #9  
Old 10-23-2001, 09:41 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
Originally posted by TDO2000
took your Athlon pIc
Yeah to all Intel users here
AMD IS MUCH BETTER AND MUCH CHEAPER UND MUCH FASTER SO U ARE AN IDIOT IF U BUY INTEL MUAHAHAHAHAHAHA
__________________

-=Shard IceFire=-
Reply With Quote
  #10  
Old 10-24-2001, 04:21 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
amd athlon is the best processor there IZ!!!! way better then shitty intel!
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 10:03 PM.


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