Jensej
Member
- Joined
- Feb 28, 2009
- Messages
- 807
- Reaction score
- 8
Witam
POtrzebuje skryptu na super/drugą promocję.
Szukałem ale jednak nic działającego nie znalazłem.
Jakby ktos mogł podać jakieś instrukcje+ skrypt?
Dam Rep++
Uzywałem tego skryptu, ale nie wiem dokładnie jak go dodać.Mam TFS (0.3.4)
Pozdrawiam
POtrzebuje skryptu na super/drugą promocję.
Szukałem ale jednak nic działającego nie znalazłem.
Jakby ktos mogł podać jakieś instrukcje+ skrypt?
Dam Rep++
Uzywałem tego skryptu, ale nie wiem dokładnie jak go dodać.Mam TFS (0.3.4)
Code:
function onSay(cid, words, param)
local cfg = { level = 100, vocs = { 5, 6, 7, 8 }, storage = 9133, cost = 100000, msgtype = MESSAGE_STATUS_CONSOLE_BLUE }
if getPlayerStorageValue(cid, cfg.storage) == -1 then
if getPlayerLevel(cid) >= cfg.level then
if isInArray(cfg.vocs, getPlayerVocation(cid)) == TRUE then
if cfg.cost ~= 0 then
if doPlayerRemoveMoney(cid, cfg.cost) == TRUE then
setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid) + 1)
doPlayerSendTextMessage(cid, cfg.msgtype, "You have been promoted to ".. getVocationInfo(getPlayerVocation(cid)).name ..".")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
setPlayerStorageValue(cid, cfg.storage, 1)
else
doPlayerSendTextMessage(cid, cfg.msgtype, "You need ".. cfg.cost .." gold coins to purchase the second promotion.")
end
end
else
doPlayerSendTextMessage(cid, cfg.msgtype, "Only players with first promotion may get the second promotion.")
end
else
doPlayerSendTextMessage(cid, cfg.msgtype, "Only characters of level ".. cfg.level .." or above, may purchase the second promotion.")
end
else
doPlayerSendTextMessage(cid, cfg.msgtype, "You have already purchased the second promotion.")
end
return FALSE
end
Code:
premiumForPromotion = "no"
Pozdrawiam