Is there a world var? I have searched around, and i think
var/(anything) is the closest to it, right?
If that is it, how can I make my shop keeper use it to adjust cost?
Like........... (for world var look for cost = (var/worldcost)) cost=worldvar
mob/NPC/Shopkeeper
icon = 'Shopkeeper.dmi'
verb/buy()
set src in view(2)
var/selling = input("What do you want to buy?") in list("Potion-50HP","Nothing.") //Lets give the usr a selection to buy from.
var/cost //This time, lets define this before we set the var...
switch(selling)
if("Potion-50HP")
cost = (var/worldcost)
if("Nothing.")
return
var/choice = input("That will be [cost] gold. You currently have [usr.Gold] gold") in list("Yes","No")
if(choice == "Yes")
if(usr.Gold >= cost)
usr.Gold -= cost
if(selling == "Potion-50HP")
new/obj/Potion(usr) //Make a new potion in the usr's inventory.
else
usr<<"You don't have enough Gold!"
spawn()
buy()
ID:166594
Jul 17 2006, 12:19 pm (Edited on Jul 17 2006, 12:26 pm)
|
|
In response to Talion Knight
|
|
Hahaha
I got a good laugh out of that. I click on his post, and I see a post of nothing at all, and then you say "a little more info would be nice." A little more info indeed! To be serious though, I assume he fixed it himself or for some other reason wanted to take back what he said and therefor edited his post. The delete button would have worked better though. |
In response to Talion Knight
|
|
Lol sorry---I accidently hit send; i edited
Thanks for quick responce, thats 1/2 of my question |
In response to Loduwijk
|
|
Lol just fixed
Loduwijk wrote: Hahaha |
world var:
or
var/somevar