I got a question and its hard to explain so i made this:
http://img215.imageshack.us/my.php?image=awdasdw4fo.png
Ok, i want to do so when you click the button, the scripts checks if you have 10k in your Backpack.
If you do have the 10k, you will receive a spellbook in your backpack,
if you dont have it will give you a message saying something like:
You dont have enough money... :/
I've checked some scripts like Bounty etc to see how this Gold Checking thing works but i cant understand it
Someone please help me
Here is the gumps script btw:
Code: Select all
use uo;
use os;
include "include/attributes";
program goldquestion( who )
var gflayout := {
"nodispose",
"nomove",
"page 0",
"resizepic 55 55 9250 290 200",
"TilePic 140 170 3834",
"text 107 65 0 0",
"page 1",
"text 65 145 0 1",
"button 190 170 210 211 1 0 1"
};
var gfdata := {
"Want to buy a spellbook?",
"Click here to buy a spellbook for 10k!"
};
var choice := SendDialogGump( who, gflayout, gfdata );
if(choice[0] == 1)
CreateItemInBackpack(who, 0x3834, 1);
endif
endprogram