Postado Junho 13, 2014 10 anos Meu amigo fez esse script pra mim, mas não ta funcionando, alguém arruma? local verifica = getPlayerVocation(cid) local verifica1 = getPlayerItemCount(cid, voc.item) local posplayer = getCreaturePosition(cid) local voc = { {vocatual = 1, vocnova = 5, preco = 2, item = 2160, classe = "Master Sorcerer", nome = "k"}, {vocatual = 2, vocnova = 6, preco = 2, item = 2160, classe = "Elder Druid", nome = "k"}, {vocatual = 3, vocnova = 7, preco = 2, item = 2160, classe = "Royal Paladin", nome = "k"}, {vocatual = 4, vocnova = 8, preco = 2, item = 2160, classe = "Elite Knight", nome = "k"}, {vocatual = 5, vocnova = 9, preco = 5, item = 5944, classe = "Ritualista", nome = "souls"}, {vocatual = 6, vocnova = 10, preco = 5, item = 5944, classe = "Curandeiro", nome = "souls"}, {vocatual = 7, vocnova = 11, preco = 5, item = 5944, classe = "Elfo", nome = "souls"}, {vocatual = 8, vocnova = 12, preco = 5, item = 5944, classe = "Cavaleiro", nome = "souls"}, } function onSay(cid, words, param, channel) if verifica == voc.vocatual then if verifica1 >= voc.preco then doPlayerSetVocation(cid, voc.vocnova) doPlayerSendTextMessage(cid,22, "Voce foi promovido para "..voc.vocnova.." .") doSendMagicEffect(posplayer, 13) doPlayerRemoveItem(cid, voc.item, voc.preco) else doPlayerSendTextMessage(cid,22, "Voce nao tem "..voc.preco.." "..voc.nome.." para ser promovido para"..voc.vocnova.." .") return true end else doPlayerSendTextMessage(cid,22, "Voce ja possui todas as promotions.") return true end end
Postado Junho 13, 2014 10 anos Testa essa amigo ... local config = { PROMOTION_1_LVL = 20, PROMOTION_1_COST = 20000, PROMOTION_2_LVL = 100, PROMOTION_2_COST = 100000 } function onSay(cid, words, param, channel) if getPlayerVocation(cid) >= 1 or getPlayerVocation(cid) <= 4 then if getPlayerLevel(cid) >= config.PROMOTION_1_LVL then if doPlayerRemoveMoney(cid, config.PROMOTION_1_COST) == true then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doSendMagicEffect(getCreaturePosition(cid), 14) doPlayerSendTextMessage(cid, 18, "You are promoted!") else doPlayerSendTextMessage(cid, 18, "You need "..config.PROMOTION_1_COST.." golds to promote.") end else doPlayerSendTextMessage(cid, 18, "You need level "..config.PROMOTION_1_LVL.." to promote.") end elseif getPlayerVocation(cid) >= 5 or getPlayerVocation(cid) <= 8 then if getPlayerLevel(cid) >= config.PROMOTION_2_LVL then if doPlayerRemoveMoney(cid, config.PROMOTION_2_COST) == true then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doSendMagicEffect(getCreaturePosition(cid), 14) doPlayerSendTextMessage(cid, 18, "You are promoted!") else doPlayerSendTextMessage(cid, 18, "You need "..config.PROMOTION_1_COST.." golds to second promote.") end else doPlayerSendTextMessage(cid, 18, "You need level "..config.PROMOTION_1_LVL.." to second promote.") end else return false end return true end Para configurar é no começo do script ... STYLLER OT 2022
Postado Junho 13, 2014 10 anos Autor Mas ai as 2 promotions seriam por dinheiro, né? eu queria que a segunda promotion fosse por item.. tipo as normais (Elite knight, master sorcerer, royal paladin e elder druid) por dinheiro, mas as outras editadas fossem por 5 item, tipo id do item = 5944 quantidade do item = 5 entao seriam 5 itens do id 5944 Editado Junho 13, 2014 10 anos por snajiw (veja o histórico de edições)
Postado Junho 13, 2014 10 anos Testa ai amigo e me avisa (não testei) local config = { PROMOTION_1_LVL = 20, -- LVL PROMOTION 1 PROMOTION_1_COST = 20000, -- MONEY PROMOTION 1 PROMOTION_2_LVL = 100, -- LVL PROMOTION 2 PROMOTION_2_ITEM = {5944, 5} -- ITEM, QUANTIDADE PARA PROMOTE 2 } function onSay(cid, words, param, channel) if getPlayerVocation(cid) >= 1 or getPlayerVocation(cid) <= 4 then if getPlayerLevel(cid) >= config.PROMOTION_1_LVL then if doPlayerRemoveMoney(cid, config.PROMOTION_1_COST) == true then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doSendMagicEffect(getCreaturePosition(cid), 14) doPlayerSendTextMessage(cid, 18, "You are promoted!") else doPlayerSendTextMessage(cid, 18, "You need "..config.PROMOTION_1_COST.." golds to promote.") end else doPlayerSendTextMessage(cid, 18, "You need level "..config.PROMOTION_1_LVL.." to promote.") end elseif getPlayerVocation(cid) >= 5 or getPlayerVocation(cid) <= 8 then if getPlayerLevel(cid) >= config.PROMOTION_2_LVL then if getPlayerItemCount(cid, config.PROMOTION_2_ITEM[1]) >= config.PROMOTION_2_ITEM[2] then if doPlayerRemoveItem(cid, config.PROMOTION_2_ITEM[1], config.PROMOTION_2_ITEM[2]) doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doSendMagicEffect(getCreaturePosition(cid), 14) doPlayerSendTextMessage(cid, 18, "You are promoted!") end else doPlayerSendTextMessage(cid, 18, "You need "..config.PROMOTION_2_ITEM[2].." "..getItemNameById(config.PROMOTION_2_ITEM[1]).." to second promote.") end else doPlayerSendTextMessage(cid, 18, "You need level "..config.PROMOTION_1_LVL.." to second promote.") end else return false end return true end STYLLER OT 2022
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.