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-06-2001, 09:34 PM
Jimboo Jimboo is offline
Registered User
Join Date: Oct 2001
Location: NJ
Posts: 15
Jimboo is on a distinguished road
Send a message via AIM to Jimboo
Hey, How could I akea shop?

yu knw with asic stuff like bombs,arrows,life, and other stuff? Is there anyway for me to have the omney when someone bys something?
__________________
"Defender of the City, I AM THE GREAT SAIYAMAN!"-Saiyaman(Gohan)
Reply With Quote
  #2  
Old 10-06-2001, 10:27 PM
Esiah Esiah is offline
Registered User
Join Date: Aug 2001
Posts: 422
Esiah is on a distinguished road
Your sig: That's not the exact quote but close enuf

anyways, if you want 99 bombs to be liek 50g, you put something liek..

if (playersays(buy bombs)) {
if (playerrupees>=50) {
playerrupees-=50;
playerbombs==99;
say2 Thanks for your purchase! Come again!;
}
}

or something liek that. Same with arrows, except replace bombs with darts
__________________



-------------------------------------------------
Must give credit where credit is due!
"Banners" (Top two): Me!
"Flash Esiah" (3rd one): Made by Tupper! Thanks Tupper!
"Esiah Spellborne Card": Yay! A card of my own! Kraken, you rule!
"2nd Esiah Spellborne Card": Made by me too
Reply With Quote
  #3  
Old 10-06-2001, 10:54 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
DO NOT USE PLAYERSAYS BECAUSE PLAYERSAYS IS DUMBER THAN THE FLASH MOVIE VERMAIN POSTED IN THE NOT GRAAL RELATED THREADS FORUM, THREAD NAME "Damage your brain here.".
Reply With Quote
  #4  
Old 10-06-2001, 11:02 PM
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
Quote:
Originally posted by Slaktmaster
DO NOT USE PLAYERSAYS BECAUSE PLAYERSAYS IS DUMBER THAN THE FLASH MOVIE VERMAIN POSTED IN THE NOT GRAAL RELATED THREADS FORUM, THREAD NAME "Damage your brain here.".
only if ur making a p2p server you mean
__________________
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
  #5  
Old 10-06-2001, 11:18 PM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
playersays is alright if you're doing a non-P2P server, but only if you put a setplayerprop #c after it. Otherwise, the operations will repeat themselves, and the player will find themselves out of money.
Reply With Quote
  #6  
Old 10-06-2001, 11:25 PM
Jimboo Jimboo is offline
Registered User
Join Date: Oct 2001
Location: NJ
Posts: 15
Jimboo is on a distinguished road
Send a message via AIM to Jimboo
re:

but will that give ME money, or just take away player money?
__________________
"Defender of the City, I AM THE GREAT SAIYAMAN!"-Saiyaman(Gohan)
Reply With Quote
  #7  
Old 10-06-2001, 11:34 PM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Re: re:

Quote:
Originally posted by Jimboo
but will that give ME money, or just take away player money?
It'll just take away player money.
Reply With Quote
  #8  
Old 10-07-2001, 02:22 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
do this, its better

NPC Code:

if(playerchats&&strequals(#c,buy bombs)&&players[0].rupees>49)
{players[0].rupees-=50;
players[0].bombs=99;
}




btw: == compares, = assigns
Reply With Quote
  #9  
Old 10-07-2001, 02:54 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

And everyone is forgetting that he wants the players money to go to him...
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #10  
Old 10-07-2001, 03:35 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
im here to save the day, lol

okay, here should be the complete script:

[code]
// This is where a player buys the bomb
if (strequals(#c,buy bombs)) {
if (playerrupees>=50) {mymoney+=50; playerrupees-=50;
}
setplayerprop #c,;
}
// This is where you take the money by saying "pay me punk"
if (strequals(#a,<your account name here>)) {
if (strequals(#c,pay me punk)) {playerrupees+=mymoney; mymoney=0;
}
}

You could automatically have the server add the money to you, with p2p NPCserver commands, but this way is more simple, and can be used on a non-p2p server .
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
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 02:42 PM.


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