Postado Janeiro 26, 2014 11 anos Desculpa Gente Uma Boa Tarde 1 Antes de tudo estou com um grande problema to com 2 dias querendo resolver isso e não consigo e decidir pedir ajuda ... Vocês já ouviram falra de otserv radbr existe 6 classe kinhigt , paladin , druid , sorcerer , drunou , infernalista e anica classe que nao estca comprando skill e a do drunou ele combra skillclub mas nao esta dando todas as classes estão comprando skill só não a classe drunou vo posta o scripts Para que voces posa me ajudar a concerta isso .. if(param == "magiclevel") then if getPlayerMagLevel(cid) >= 200 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.") return TRUE end if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 3 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 3) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillclub") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isDrunou(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11564,os.time()+1) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillsword") then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillaxe") then if getPlayerSkillLevel(cid, SKILL_AXE) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skilldistance") then if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillshielding") then if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "magiclevel5") then if getPlayerMagLevel(cid) >= 196 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.") return TRUE end if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 15 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 15) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillclub10") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isDrunou(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11564,os.time()+1) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillsword10") then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillaxe10") then if getPlayerSkillLevel(cid, SKILL_AXE) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skilldistance10") then if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "skillshielding10") then if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end
Postado Janeiro 26, 2014 11 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Dúvidas Resolvidas" Para: "OTServ → Suporte OTServ → Suporte de Scripts" Bruno Carvalho / Ex-Administrador TibiaKing [email protected] Em 26/12/2016 em 03:47, Spraypaint disse: A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une. -miltinho
Postado Março 20, 2014 11 anos cara, tá escrito if not isPaladin(cid) then só tira esse not da frente que resolve o seu problema. Repete esse mesmo passo pra Knight, Drunou e etc. Outra coisa: vc tem que garantir que o seu server possui essa função isDrunou.. caso não existe substitui if not isDrunou(cid) then por if isInArray({NUMERO DA CLASSE}, getPlayerVocation(cid)) then no numero da classe coloca o NUMERO DA CLASSE kkk vc pode ver isso na vocations.xml dentro do seu server. Boa Sorte Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
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.