adix1310 - 2012-10-14 12:04:50

Do talkactions wklejamy kod:

Kod:

<talkaction words="!soft" event="script" value="soft.lua"/>

Kod:

local config = {
    cost = 30000, -- Ile kosztuje naprawienie softow
    idsoft = 2640, -- ID softow
    idwornsoft = 10021 -- ID zepsutych softow    
    }
function onSay(cid, words, param)
local pos = getCreaturePosition(cid)
if getPlayerItemCount(cid, config.idwornsoft) >= 1 then
if getPlayerMoney(cid) >= config.cost then
doPlayerBuyItem(cid, config.idsoft, 1, config.cost, 1)
doPlayerRemoveItem(cid, config.idwornsoft, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Twoje Soft Boots Zostaly Naladowane.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Niemasz Kasy Na Naladowanie Soft Boots!")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Niemasz Worn Soft Boots!")
end
return TRUE
end
www.gimnazjum.pun.pl www.robole.pun.pl www.nl2-godmt2.pun.pl www.wolontariat.pun.pl www.darkbiotech.pun.pl