Page 1 of 1
Script request random number...
Posted: Fri Aug 18, 2006 12:22 pm
by Poi
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)
Re: Script request random number...
Posted: Fri Aug 18, 2006 1:29 pm
by Firedancer
<e.g. some .textcommand...>
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
hope that helps
Posted: Fri Aug 18, 2006 1:42 pm
by Yukiko
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?
Posted: Fri Aug 18, 2006 1:51 pm
by Poi
Thanks fire dancer, and uhh yukiko.. what the heck?
Posted: Fri Aug 18, 2006 1:54 pm
by Yukiko
*laughs*
I was teasing Firedancer. In his script the sys message says "congrats...you won....uhm.. a nonexisting item".
Posted: Fri Aug 18, 2006 3:11 pm
by Poi
Hehe.. taking a while to test if it makes the item or not lol... Hope it does work though
Posted: Sat Aug 19, 2006 1:39 am
by Firedancer
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*
Posted: Sat Aug 19, 2006 6:45 am
by Poi
It works

Posted: Mon Aug 21, 2006 9:27 pm
by Yukiko
Yes Firedancer. I guess the question truly boils down to "Is nothing really something?"
*giggles*
I guess we'll leave that to the quantum physicists out there.
Posted: Mon Aug 21, 2006 9:45 pm
by Marilla
This thread hurts me head!
