ID:141342
 
Code:
if("Shinigami")
if(prob(1.1))
vaizardabil = 1
if(src.vaizardabil)
usr.hvai=1
usr.vai=1
usr.verbs+= new /mob/vaizard/verb/Materialize_Half_Mask


Problem description:
Its giving it to human not Shinigami is there a way around this thanx in advance

1) You cannot make a new verb.
2) You enter the arg in the form of a percent, such as 50 for 50%. You entered 110%.
In response to Jeff8500
ohh Ok
thanx
In response to Jeff8500
Jeff8500 wrote:
1) You cannot make a new verb.

It's possible, actually. new() can create new 'instances' of verbs, with dynamic properties (but the verb will of course do the same thing as usual). These can then be used and called as normally. The first argument is the object to attach the verb to, the second is the verb's name (or null to leave the default), the third is the verb's desc (or again null for default). All 3 args are optional and there don't appear to be more args. The verb is automatically added to the object's verbs list, though it can also be added by reference (procedure type paths are special and different from normal ones; they can be unique and you can also read the procedure's properties using them) to other verbs list. To remove the verb from the verbs list(s) later on, you have to use an identical reference, so either store the initial one new() returns, create a new verb with the same properties with new(), or loop through the verbs list to remove it.
aaa/verb/x()
src << "hi"
mob/verb
make_new_verb()
var/V = new /aaa/verb/x(src,"NewVerb","Desc")
sleep(50)
src.verbs -= V //remove the new verb

I suppose you shouldn't mess with it though if you don't make use of the dynamic args, and just use a regular verb type path to add and remove.

EDIT:
2) You enter the arg in the form of a percent, such as 50 for 50%. You entered 110%.

Huh? He put 1.1%. Percents can be fractional as well; whether prob() supports that or not, I'm not sure.
In response to Kaioken
Oh, I didn't know what I was thinking there on the prob() thing. The new verb thing is interesting, though.

His problem appears to be that he is checking if the string "shinigami" is true, and it always will be true.