mob
fisherman
icon='boy.dmi'
density=1
verb/Sell_fish()
if(usr.fish > 1)
set src in oview(1)
alert ("Thanks, here ill give you [usr.fish] for that one, but less for the next fish")
usr.contents-=new/obj/Fish
usr.money+=usr.fish
usr.fish-=1
else
usr<<"you got no fish!"
i want to get it to delete the obj fish out of the inventory when you sell the fish,
ID:177130
![]() Oct 27 2002, 2:18 pm
|
|
![]() Oct 27 2002, 2:34 pm
|
|
its for a fishing guy if you havent guest, you sell him the fish and then you loose a fish from your inventory. as the code should do
|
The basic concept here is that we need to find a fish that someone has. locate() can be used for that.
mob |
That is because you copied and pasted the code. BYOND is case sensitive. If you can't figure it out, too bad.
|
ok, i didnt copy paste. i just wrote it down the way he said to. i know byond is very sensative so i followed down every bit of it correctly. if he said thats the way then why would i change anything about it!
|
SkylineR34 wrote:
mob try something like this.. mob fisherman verb/Sell_fish() set src in oview(1) var/obj/Fish/F=locate() in usr if(F) //add stuff you want to do here... else usr<<"you got no fish!" |