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 11-28-2001, 03:42 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
Shops?

how can I make the script that when the player says the item name hes gets it and the money gets automcatically taken outta his pocket?
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #2  
Old 11-28-2001, 04:21 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
play with the rupee count its not hard at all
Reply With Quote
  #3  
Old 11-28-2001, 04:38 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
okay

im not gonna tell you the script, but ill give you some pointers and basic info, since you are obviously very new.

you will need to learn how to use these variables:

#c, (the string that is determined by the players chat text)
playerrupees, which is how many gelet, gralet, rupees, what ever you want to call them, that the player has

the strequals command/flag
setplayerprop command.

So, lets use all of these, to make an example of how each work

if (strequals(#c,happy duck) {
playerrupees=99; setplayerprop #c,VERY happy duck;
}

So, this is when the player's chat text is "happy duck", the players money (playerrupees) is set to 99, and his chat text is set to "VERY happy duck"

if you want to make sure that the player has enough money

if (playerrupees>=5) {
}

that checks to see if the player has or has more than 5 rupees.

>= means greater than or equal to. other signs: = equal, > greater than, < less than, <= less than or equal to, != not equal

that should help somewhat if you can digest it. If you cannot, either im not very good at explaning, or you probably wont pick up scripting.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #4  
Old 11-28-2001, 05:16 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
...
__________________
Reply With Quote
  #5  
Old 11-28-2001, 06:28 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
I suggest you use
if (playerchats&&strequals(#c,buy whatever)&&!isweapon)

the !isweapon part is important, cuz if its not there , then even after the player has the npc and he says buy whatever he would waste money lol
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #6  
Old 11-28-2001, 07:26 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
umm

thats what the command
setplayerprop is for. just change their text like
setplayerprop #c,<Item> Bought!;
its their money, if they want to waste it, let them, lol.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #7  
Old 11-28-2001, 08:31 AM
psi psi is offline
Registered User
Join Date: Nov 2001
Location: Canada
Posts: 77
psi is on a distinguished road
THNX

THNX ALOT
__________________
Psyche[Leader]{Natures Avengers}

Bomys Rock!
Reply With Quote
  #8  
Old 11-28-2001, 08:54 AM
Brad_Elven Brad_Elven is offline
Registered User
Join Date: Jul 2001
Posts: 0
Brad_Elven is on a distinguished road
Send a message via AIM to Brad_Elven
if u dont have it here it is as a freebie but i know people are just gonna modify it and get it down to .2 lines of code hehe

if(playerchats&&strequals(#c,buy beer)&&playerrupees>=5){
playerrupees-=5;
message YOU WERE HEALED!;
//actually doesnt heal them MUAHAHAHAHA
}
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 08:00 PM.


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