Skrypt by Moqill
Licencja: Nie może się znaleść na innych stronach www. Można sobie skorzytać w silniczku tylko…
Testowane: tfs 0.4_

Pliczek chest.lua

chest.lua
local config = {
	[uid] = {storage=ID, item=ID}, -- uid to uniqudeid skrzynki, storage to to co dopisuje się w bazie, item id przedmiotu którym ma otrzymać gracz
[uid] = {storage=ID, item=ID},
[uid] = {storage=ID, item=ID}
}
 
function onUse(cid, item, frompos, item2, topos)
 
	local cfg=config[item.uid]
		if getPlayerStorageValue(cid, cfg.storage) == -1 then
			doPlayerSendTextMessage(cid,22,"You have found "..getItemNameById(cfg.item)..".")
			doPlayerAddItem(cid,cfg.item,1)
			setPlayerStorageValue(cid,cfg.storage,1)
		else 
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end
	return true
end

do action.xml dodajemy jedna z linijek do wyboru

action.xml
<action itemid="itemid_skrzynli;itemid_skrzynli;itemid_skrzynli" script="chest.lua" />
<action uniqueid="odjakiegouid-dojakiegouid" script="chest.lua" /> 
otspub/skrzynki.lua_na_tablicy.txt · Last modified: 2010/05/04 22:28 by moqill
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki