GM Michael
User
- Joined
- Nov 4, 2008
- Messages
- 17
- Reaction score
- 0
A wiec tak:
Wchodzimy w actions\scripts i robimy plik o nazwie seq.lua , a nim wrzucamy:
potem wchodzimy w actions.xml i dodajemy:
Potem odpalamy map editora, stawiamy skrzynk? i
dodajemy jej action id 5000
Dzia?anie:
Skrypt jest m?j. Je?li co? nie dzia?a prosz? o napisanie na pw ;]
Nie testowa?em tego skryptu
Wchodzimy w actions\scripts i robimy plik o nazwie seq.lua , a nim wrzucamy:
Code:
--[[ Script by GM Michael ]]--
local STORAGE = 1000
function onUse(cid, item, frompos, item2, topos)
local Items = {2160, 2463, 3940, 2647, 2456, 2544, 7432, 2435, 7408, 2525, 2182, 2190, 3982, 2457}
local Count = {5, 'a', 'a', 1, 'a', 100, 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'}
local ItemCount = 0
if (item.actionid == 5000) then
if (getPlayerStorageValue(cid, STORAGE) < 1) then
local i = 0
local Plural = ""
local ItemName = ""
for i in Items do
if (type(Count[i]) == 'string') then
ItemCount = 1
else
ItemCount = Count[i]
end
local ItemName = getItemName(items[i])
if ((ItemCount > 1) and (string.sub(ItemName, string.len(ItemName)) ~= "s")) then
Plural = "s"
else
Plural = ""
end
doPlayerAddItem(cid, Items[i], ItemCount)
doPlayerSendTextMessage(cid,MessageClasses, "You have found started eq.")
end
else
doPlayerSendTextMessage(cid, 22, "It's empty.")
end
end
end
Code:
<action actionid="5000" script="seq.lua"/>
dodajemy jej action id 5000
Dzia?anie:
Code:
Po u?yciu skrzynki dostajemy:
-Steel Helmet
-Plate Armor
-Plate Legs
-Dwarven Shield
-Dwarven Axe
-Furry Club
-Wyvern Fang
-Snakebite Rod
-Wand of Vortex
-Backpack(camouflage)
-Crocodile Boots
Nie testowa?em tego skryptu