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)
|
|
In response to Falacy
|
|
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 :( |
In response to Cybork
|
|
Remove
New() src.CreateName() |
In response to Scizzees
|
|
Doesnt work :(
|
In response to Scizzees
|
|
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 |
In response to Falacy
|
|
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.... |
In response to Scizzees
|
|
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? |
In response to GhostAnime
|
|
Yeah.. already tried..
|
In response to Cybork
|
|
Have any statement anywhere which could remove the verb? Because it should show up...
|
In response to GhostAnime
|
|
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 =( |
In response to Cybork
|
|
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)
|
In response to Kakashi24142
|
|
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? |
In response to Falacy
|
|
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.
|
In response to Cybork
|
|
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. |
In response to Kakashi24142
|
|
Dont works =/
|
In response to Falacy
|
|
No =/
I already putted a name and dont shows up =( |
In response to Kakashi24142
|
|
yes...
|
In response to YMIHere
|
|
I havnt deleted the obj... i just changed into mob (i replaced the obj) but i putted the mob in the map and doesnt work...
|
i dont see anything that would be preventing the verb from showing