Hey, I have this script:
It should work only for MS (voc ID=5), how can I set it?
Also if other voc will try enchant gem it should say
thanks
Code:
local config = {
cost = 30000,
id_enchantedruby = 7760,
id_smallruby = 2147
}
function onSay(cid, words, param)
local pos = getCreaturePosition(cid)
if getPlayerItemCount(cid, config.id_smallruby) >= 1 then
if getPlayerMoney(cid) >= config.cost then
doPlayerBuyItem(cid, config.id_enchantedruby, 1, config.cost, 1)
doPlayerRemoveItem(cid, config.id_smallruby, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have enchanted small ruby.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
doPlayerAddSoul(cid, -50)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have 30000 gold coins!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have small ruby!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return TRUE
end
It should work only for MS (voc ID=5), how can I set it?
Also if other voc will try enchant gem it should say
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not master sorcerer!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
Last edited: