mob
Shopkeeper
icon = 'Npcs.dmi'
icon_state = "Shopkeeper"
name = "Shopkeeper"
hp = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
verb
Buy()
set src in oview(2)
switch(input("What would like to buy today?")in list("Cheri Berry: 200 PokeDollars","Pokeball: 500 PokeDollars","Great Ball: 1000 PokeDollars","Protein: 2000 PokeDollars","Rare Candy: 4000 PokeDollars","Never Mind"))
if("Never Mind")
return
if("Cheri Berry: 200 PokeDollars")
if(usr.PokeDollars >= 200)
usr.PokeDollars -= 200
usr.contents += new/obj/Equipment/Cheri_Berry
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: Thank you, please come again!"
return
..()
else
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: You cannot afford this!"
return
if("Pokeball: 500 PokeDollars")
if(usr.PokeDollars >= 500)
usr.PokeDollars -= 500
usr.contents += new/obj/Equipment/Pokeball
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: Thank you, please come again!"
return
..()
else
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: You cannot afford this!"
return
if("Great Ball: 1000 PokeDollars")
if(usr.PokeDollars >= 1000)
usr.PokeDollars -= 1000
usr.contents += new/obj/Equipment/Great_Ball
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: Thank you, please come again!"
return
..()
else
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: You cannot afford this!"
return
if("Rare Candy: 4000 PokeDollars")
if(usr.PokeDollars >= 4000)
usr.PokeDollars -= 4000
usr.contents += new/obj/Equipment/Rare_Candy
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: Thank you, please come again!"
return
..()
else
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: You cannot afford this!"
return
if("Protein: 2000 PokeDollars")
if(usr.PokeDollars >= 2000)
usr.PokeDollars -= 2000
usr.contents += new/obj/Equipment/Protein
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: Thank you, please come again!"
return
..()
else
usr << "<font face = 'Comic Sans MS'><font size = -1><B><font color = white>ShopKeeper: You cannot afford this!"
return
Sell(var/obj/Equipment/O in usr)
set src in oview(2)
set category = null
switch(alert("[src]: Are you sure you want to sell [O.name] for [O.value] PokeDollars?","Selling","Yes","No"))
if("Yes")
if(istype(O,/obj/Equipment))
if(O.equiped == 0)
usr.PokeDollars += O.value
del(O)
else
usr << "<B>You need to unequip [O.name] first!"
return
else
return
if("No")
return
1
2
In response to Elation
|
|
own personal use...
|
In response to Element Hero creator
|
|
Could I borrow some nines? I'm making a cake and I'm fresh out.
|
In response to Garthor
|
|
lol, I put that so the npc would be unkillable. That was when I was still trying to remember how to code. gonna delete it now XD.
|
In response to Element Hero creator
|
|
Element Hero creator wrote:
lol, I put that so the npc would be unkillable. That was when I was still trying to remember how to code. gonna delete it now XD. well, everyone learns eventually. the better way is to disable attacking in any area with an NPC |
In response to King of Slimes
|
|
King of Slimes wrote:
the better way is to disable attacking in any area with an NPC :\ Obviously, that isn't a better way, it isn't even the same effect. The better way would be to disable attacking NPCs such as shopkeepers...duh. |
In response to Element Hero creator
|
|
It gets rounded off at a certain point anyway, no matter how many extra nines you put afterwards. =P
|
In response to Kaioken
|
|
Kaioken wrote:
King of Slimes wrote: kinda forgot about that... eh, i'm tired as hell atm, this may work. mob/proc |
In response to King of Slimes
|
|
King of Slimes wrote:
Kaioken wrote: > mob/proc ...Leave the Forums, now. That won't even compile :\ > mob/proc That is the "correct" way to do it(indentation is kinda screwed up). King of Slimes wrote: well, everyone learns eventually. That's true, everyone eventually learns, but you obviously haven't yet. |
1
2
M.deathcheck(src) means src kills M.