mob/NPC/Slot_Machine
name = ""
icon = 'Slot Machines.dmi'
icon_state = "slot"
density = 1
safe = 1
it_lock = 1
powerlevel = 100
New()
src.CreateName()
verb
Talk()
set category = "Actions"
set src in oview(2)
var/bet = input("How much Zenni do you want to bet? (You have [num2text(usr.zenni,100)] Zenni!)","Drop Zenni",) as num
if(bet <= 10)
usr << "You have to bet atleast 10 Zenni!"
return
if(bet > usr:zenni)
usr << "You dont have that much Zenni to bet."
return
else
if(prob(2))
icon_state = "jackpot"
usr << "You won the jackpot !"
usr.zenni += bet * 50
else
icon_state = "wrong"
usr << "You lost [bet] zenni"
usr.zenni -= bet
I really think this code is ok... however nothing shows up on the "Actions" tab
ID:143413
![]() Sep 12 2007, 9:10 am (Edited on Sep 12 2007, 12:05 pm)
|
|
me neither... but when i approach the machine it doesnt show up on the actions tab...
I also try to click whit the right button of the mouse but it doesnt work :( |
Scizzees wrote:
Remove im not sure what your src.CreatName() proc does i assumed it gave it a named based on something but by default the name of this machine is "" which is most likely the problem if it doesnt get changed to something in the CreateName proc |
Every other NPC works whit that proc... but this dont...
I created it first as a obj... then i changed to mob but nothing happens.... |
Why? It's perfectly legit there (though it could be better if it was moved under mob/NPC/New() if all NPCs have those created).
Do you have you other Talk() verb near the slot machine? Tried right clicking the slot machine as well? |
mob/NPC/Slot_Machine
name = "" icon = 'Slot Machines.dmi' icon_state = "slot" density = 1 safe = 1 it_lock = 1 powerlevel = 100 verb Talk() set category = "Actions" set src in oview(2) var/bet = input("How much Zenni do you want to bet? (You have [num2text(usr.zenni,100)] Zenni!)","Drop Zenni",) as num if(bet <= 10) usr << "You have to bet atleast 10 Zenni!" return if(bet > usr:zenni) usr << "You dont have that much Zenni to bet." return else if(prob(2)) icon_state = "jackpot" usr << "You won the jackpot !" usr.zenni += bet * 50 else icon_state = "wrong" usr << "You lost [bet] zenni" usr.zenni -= bet I dont think so =/ I used other mob code to code this one and still... nothing =( |
change the set src setting, you never know what can be screwing it up. Just make it set src in view()(just to test to make sure the src setting is working properly)
|
90% chance the problem is that this thing has no name <.<
when u put the mouse over it does it show in the bottom left corner? |
thinking about that, I don't see a reason why you need the name to be "". I see no point in that unless you wanted to hide the name from players.
|
Cybork wrote:
I created it first as a obj... then i changed to mob but nothing happens.... Is the /obj still in your game? You could be looking at the /obj version in the game without the verb, while this new /mob version hasn't been put on the map. |
i dont see anything that would be preventing the verb from showing