- OTS Fans http://www.otsfans.pun.pl/index.php - Actions http://www.otsfans.pun.pl/viewforum.php?id=112 - Za pomoc± dĽwigni znikaj± przedmioty a pojawia się nowy. http://www.otsfans.pun.pl/viewtopic.php?id=23 |
Xelemeleque - 2011-04-17 06:45:31 |
Autorem Jest Vortis&Master Manyy
Kod:function onUse(cid, item, frompos, item2, topos) item1pos = {x=488, y=470, z=11, stackpos=1} -- pos gdzie ma lezec 1 itemek item2pos = {x=489, y=470, z=11, stackpos=1} -- pos gdzie ma lezec 2 itemek nagrodapos = {x=490, y=470, z=11, stackpos=1} -- pos gdzie ma sie pojawic nagroda item1 = getThingfromPos(item1pos) item2 = getThingfromPos(item2pos) if item.uid == 6666 and item.itemid == 1945 and item1.itemid == XXXX and item2.itemid == OOOO then -- XXXX - id 1 itemka OOOO - id 2 itemka doRemoveItem(item1.uid,1) doRemoveItem(item2.uid,1) doCreateItem(2400,1,nagrodapos) doPlayerSendTextMessage(cid,22,"Zdobyles Magic Sword.") doTransformItem(item.uid,item.itemid+1) elseif item.uid == 6666 and item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendTextMessage(cid,22,"Nie mozliwe.") end return 1 end Następnie w data/actions/actions.xml dodajemy linijkę: Kod:<action uniqueid="6666" script="dzwignia.lua" /> To na tyle w tym kodzie |