095
Could someone make a me a script that just makes a random number between 1 and 50, and sets it to a variable and if it turns out to be 7 create an item(Ill edit the item so for now just make it 0x0000) in the backpack of the person who won.. Thanks :d(Its for a voting script)
Script request random number...
-
Firedancer
- Grandmaster Poster
- Posts: 104
- Joined: Fri Feb 03, 2006 6:32 am
Re: Script request random number...
<e.g. some .textcommand...>
hope that helps
Code: Select all
use uo;
use os;
use util;
program randomstuff(who)
var itemtocreate:=0x0000;
var itemamount:=1;
var randomnumber:=randomint(50)+1; //randomint(50) = 0....49
if(randomnumber == 7)
CreateItemInBackpack( who, itemtocreate, itemamount);
sendsysmessage(who,"congrats...you won....uhm.. a nonexisting item");
endif
endprogram
Hmmm...
Firedancer your script brings up an interesting question.
Can one create a non-existing item? If the item doesn't exist after creation then was anything actually created?
The created item may exist in an alternate dimension and thus we might perceive it as being a non-existant item but I do not believe it is possible to create, in our dimension, an item that does not exist.
Care to offer any thoughts Firedancer?
Firedancer your script brings up an interesting question.
Can one create a non-existing item? If the item doesn't exist after creation then was anything actually created?
The created item may exist in an alternate dimension and thus we might perceive it as being a non-existant item but I do not believe it is possible to create, in our dimension, an item that does not exist.
Care to offer any thoughts Firedancer?
-
Firedancer
- Grandmaster Poster
- Posts: 104
- Joined: Fri Feb 03, 2006 6:32 am
hehe...
actually I guess the script will not work as long as the item-id is 0.... though I didn't want to confuse anyone by using a line of code like:
sendsysmessage(who,"congrats...you won....uhm.. an error message");
even though that would have been more accurate *laughs*
though back to answering your question, Yukiko: as the item does neither exist by definition nor has it been specified, I doubt it would be possible to have accidantly been created in other dimensions.... but then even if creating nothingness.... you might still have created something... even if that something is nothing.... wouldn't you agree? if god created the world, he had to create a lot of nothing after all as well.... *rofl*
actually I guess the script will not work as long as the item-id is 0.... though I didn't want to confuse anyone by using a line of code like:
sendsysmessage(who,"congrats...you won....uhm.. an error message");
even though that would have been more accurate *laughs*
though back to answering your question, Yukiko: as the item does neither exist by definition nor has it been specified, I doubt it would be possible to have accidantly been created in other dimensions.... but then even if creating nothingness.... you might still have created something... even if that something is nothing.... wouldn't you agree? if god created the world, he had to create a lot of nothing after all as well.... *rofl*