Graal Pastebin
New PastePasted on November 13, 2011.
View the raw file
function onActionServerSide(trig) { if (trig == "buy") { temp.pl = findplayer(params[3]); echo("Trigger check"); pl.addweapon(params[2]); pl.client.gold -= params[1]; } } //#CLIENTSIDE function onMouseDown() { if (mousex in | this.x, this.x + width | && mousey in | this.y, this.y + height | ) { Shop_Window1.visible = true; } } function SetItem(itemname, itemprice, itemdesc, realitem) { Shop_Text1.text = "Item:" SPC itemname; Shop_Text2.text = "Price:" SPC itemprice; Shop_MultiLine1.text = itemdesc; client.realitem = realitem; client.store1 = itemname; client.store2 = itemprice; } function Shop_Button1.onAction() { if (client.gold > client.store1 || client.gold == client.store1) { if (!(hasweapon((@client.realitem)))) { triggerserver("gui", this.name, "buy", client.store2, client.realitem, player.account); } } }