Witam,
Postanowi?em zrobic Random Present Bag, bardzo podobny do tego z Vestia.pl
a wi?c.
Items.xml
Znajdz item o ID:
zamie? ca?y na :
Stw?rz plik RandomPresent.lua w actions/scripts/other
w Actions.xml:
Postanowi?em zrobic Random Present Bag, bardzo podobny do tego z Vestia.pl
a wi?c.
Items.xml
Znajdz item o ID:
Code:
7393
zamie? ca?y na :
Code:
<item id="7393" article="a" name="Random Present Bag">
<attribute key="weight" value="500" />
</item>
Stw?rz plik RandomPresent.lua w actions/scripts/other
Code:
local RandomPresent = { 8925, 5907, 6433, 9776, 9932, 9777 }
function onUse(cid, item, frompos, item2, topos)
local Random = math.random(#RandomPresent)
doPlayerSendTextMessage(cid,22,"Otrzyma?e? 'Random Present'. Gratuluje.")
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, RandomPresent[Random])
end
w Actions.xml:
Code:
<action itemid="7393" event="script" value="other/RandomPresent.lua"/>