Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

A nice script

18 years ago
Hey guys, just made another script. It's pretty simple, but some of you who want an item script, i think it's pretty cool.
IF $PAGEID = 300 THEN
BEGIN
%DICEROLL := %LUCK + 1D5
IF %DICEROLL > 33 THEN
$DEST := @P343
ELSE
$DEST := @P347
END

ELSE
$DEST := @P345

Any of these numbers can be modified. This script is meant to be put in an item script. Then, wherever someone uses the item in game, the script runs. First, it checks to see if its on the page you meant it to be used on. If so, it rolls some dice, in this case checking a luck variable and adding 1D5 to it, but you could have any variable with or without dice, depending on what you wanted to check.

Then, if the diceroll is sucessful it goes to one page, if not it goes to another "failure" page. Note also that if the item is not used on the page at the very top, it will go to a "can't use item here page." Obviously all these pages have to be created. One of my pet peeves is the pop up we all get one someone doesn't assign a default page to an item. I hate those things for some reason. anyway, hope this is of some use to you.

A nice script

18 years ago
That's a great script, madglee! And I, too, totally dislike those annoying popup's because then when i "cheat" using the back button, i have to go through all those annoying popups again :P lol.

A nice script

18 years ago

A-FUCKING-MEN!!!

hhahahaha

A nice script

18 years ago
Hahah, I was going to say that, actually. That's why it's a pet peeve! :P

A nice script

18 years ago
It's a pretty easy script and although it would be easy to work out if you knew scripting, it is a good thing for people who can't understand this language (which is probably as unreadable as curved writing to them). Well done on working out scripting, by the way.

A nice script

18 years ago
Yes, its great for beginners, october.

A nice script

18 years ago
That's what I meant.