Postado Fevereiro 6, 2016 9 anos Olá galera do TK, estou aqui para pedir uma ajuda com uma talkaction que eu coloquei recentemente no meu servidor !!! coloquei a Talkaction !comprar o problema é que na parte de compra de skills, ela não está funcionando, ela faz o character relogar na hora da compra tudo certinho, cobra a quantidade de moedas para a compra de skills, mais acaba não acrecentando o skill ao player . gostaria de saber se tenho que executar algum comando no phpmyadmin, para funcionar, se alguem puder me ajudar quanto a isso darei REP+ segue a baixo a TALKACTION - lembrando que é apenas as skills's que não são acrecentadas, o resto das vendas do script estão funcionando perfeitamente !!! function onSay(cid, words, param) if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área [PROTECT ZONE] para utilizar este comando.") return TRUE end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return TRUE end if(param ~= "") and (param ~= "1kk") and (param ~= "vip10") and (param ~= "vip20") and (param ~= "golden-set") and (param ~= "full-set") and (param ~= "dragon-set") and (param ~= "demon-set") and (param ~= "exp") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel2") and (param ~= "skillclub2") and (param ~= "skillsword2") and (param ~= "skillaxe2") and (param ~= "skilldistance2") and (param ~= "skillshielding2") and (param ~= "removerfrag") and (param ~= "removerredskull") and (param ~= "removerblackskull") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n1kk = 100 crystal coins por 1 barra.\nvip10 = 10 dias de vip por 50 barras.\nvip20 = 20 dias de vip por 100 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 3 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 5 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 7 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nexp = 100000000 pontos de experiencia por 30 barras.\nskillclub = adiciona 1 skill club por 25 barras.\nskillsword = adiciona 1 skill sword por 25 barras.\nskillaxe = adiciona 1 skill axe por 25 barras.\nskilldistance = adiciona 1 skill distance por 25 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 25 barras.\nmagiclevel = adiciona 1 magic level por 25 barras.\nmagiclevel2 = adiciona 2 magic level por 50 barras.\nskillclub2 = adiciona 2 skills club por 50 barras.\nskillsword2 = adiciona 2 skills sword por 50 barras.\nskillaxe2 = adiciona 2 skills axe por 50 barras.\nskilldistance2 = adiciona 2 skill distance por 50 barras.\nskillshielding2 = adiciona 2 skill shielding por 50 barras.\nremoverfrag = remove todos frags por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 15 barras.\nremoverblackskull = remove black skull por 25 barras.\n") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.") return TRUE end if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n1kk = 100 crystal coins por 1 barras.\nvip10 = 10 dias de vip por 50 barras.\nvip20 = 20 dias de vip por 100 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 3 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 5 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 7 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nexp = 100000000 pontos de experiencia por 30 barras.\nskillclub = adiciona 1 skill club por 25 barras.\nskillsword = adiciona 1 skill sword por 25 barras.\nskillaxe = adiciona 1 skill axe por 25 barras.\nskilldistance = adiciona 1 skill distance por 25 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 25 barras.\nmagiclevel = adiciona 1 magic level por 25 barras.\nmagiclevel2 = adiciona 2 magic level por 50 barras.\nskillclub2 = adiciona 2 skills club por 50 barras.\nskillsword2 = adiciona 2 skills sword por 50 barras.\nskillaxe2 = adiciona 2 skills axe por 50 barras.\nskilldistance2 = adiciona 2 skill distance por 50 barras.\nskillshielding2 = adiciona 2 skill shielding por 50 barras.\nremoverfrag = remove um frag por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 15 barras.\nremoverblackskull = remove black skull por 25 barras.\n") return TRUE end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ if(param == "1kk") then if getPlayerItemCount(cid, 9971) >= 1 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2160, 100) doPlayerRemoveItem(cid, 9971, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "vip10") then if getPlayerItemCount(cid, 9971) >= 50 then doPlayerAddPremiumDays(cid, 10) doPlayerRemoveItem(cid, 9971, 50) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de [DONATE] com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "vip20") then if getPlayerItemCount(cid, 9971) >= 100 then doPlayerAddPremiumDays(cid, 20) doPlayerRemoveItem(cid, 9971, 100) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de [DONATE] com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "golden-set") then if getPlayerItemCount(cid, 9971) >= 3 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2471, 1) doAddContainerItem(bag, 2466, 1) doAddContainerItem(bag, 2470, 1) doAddContainerItem(bag, 2646, 1) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Golden-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "full-set") then if getPlayerItemCount(cid, 9971) >= 5 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2493, 1) doAddContainerItem(bag, 2472, 1) doAddContainerItem(bag, 2470, 1) doAddContainerItem(bag, 2514, 1) doPlayerRemoveItem(cid, 9971, 15) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Full-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "dragon-set") then if getPlayerItemCount(cid, 9971) >= 7 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2506, 1) doAddContainerItem(bag, 2492, 1) doAddContainerItem(bag, 2469, 1) doAddContainerItem(bag, 2516, 1) doPlayerRemoveItem(cid, 9971, 20) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Dragon-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "demon-set") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2493, 1) doAddContainerItem(bag, 2494, 1) doAddContainerItem(bag, 2495, 1) doAddContainerItem(bag, 2520, 1) doPlayerRemoveItem(cid, 9971, 20) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Demon-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "exp") then if getPlayerItemCount(cid, 9971) >= 10 then if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 1000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 10000) doPlayerRemoveItem(cid, 9971, 15) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 100000) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 100kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 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 isElderDruid(cid) and not isMasterSorcerer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 25) 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 isKnight(cid) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 25) 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 25) 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) and not isRoyalPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 25) 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 isRoyalPaladin(cid) and not isEliteKnight(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 25) 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 == "magiclevel2") 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 isElderDruid(cid) and not isMasterSorcerer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 2 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 == "skillclub2") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knight podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (club + 2) .. ", `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 == "skillsword2") 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 2) .. ", `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 == "skillaxe2") 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >=25 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 2) .. ", `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 == "skilldistance2") 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) and not isRoyalPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 2) .. ", `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 == "skillshielding2") 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 isRoyalPaladin(cid) and not isEliteKnight(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 2) .. ", `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 == "removerfrag") then if getPlayerItemCount(cid, 9971) >= 10 then doPlayerRemoveItem(cid, 9971, 10) db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;") setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.") 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 == "removerredskull") then if (getCreatureSkullType(cid) == SKULL_RED) == FALSE then doPlayerSendTextMessage(cid,27,"Você não está Red Skull para utilizar este comando.") return TRUE end if getPlayerItemCount(cid, 9971) >= 15 then doPlayerRemoveItem(cid, 9971, 15) db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid)) local skullEnd = getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE) setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Red Skull com sucesso.") 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 == "removerblackskull") then if (getCreatureSkullType(cid) == SKULL_BLACK) == FALSE then doPlayerSendTextMessage(cid,27,"Você não está Black Skull para utilizar este comando.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then doPlayerRemoveItem(cid, 9971, 25) db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid)) local skullEnd = getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE) setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Black Skull com sucesso.") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end end Editado Fevereiro 6, 2016 9 anos por Micheel15 (veja o histórico de edições)
Postado Fevereiro 6, 2016 9 anos Esta é uma mensagem automática, este tópico foi movido para a área correta. Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680Este tópico foi movido: De: Scripting OTServ > OTServ > Actions e TalkActions Para: Suporte OTServ > OTServ > Suporte de Scripts
Postado Fevereiro 6, 2016 9 anos Tenta usar ai Spoiler function onSay(cid, words, param) if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área [PROTECT ZONE] para utilizar este comando.") return TRUE end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return TRUE end if(param ~= "") and (param ~= "1kk") and (param ~= "vip10") and (param ~= "vip20") and (param ~= "golden-set") and (param ~= "full-set") and (param ~= "dragon-set") and (param ~= "demon-set") and (param ~= "exp") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel2") and (param ~= "skillclub2") and (param ~= "skillsword2") and (param ~= "skillaxe2") and (param ~= "skilldistance2") and (param ~= "skillshielding2") and (param ~= "removerfrag") and (param ~= "removerredskull") and (param ~= "removerblackskull") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n1kk = 100 crystal coins por 1 barra.\nvip10 = 10 dias de vip por 50 barras.\nvip20 = 20 dias de vip por 100 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 3 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 5 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 7 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nexp = 100000000 pontos de experiencia por 30 barras.\nskillclub = adiciona 1 skill club por 25 barras.\nskillsword = adiciona 1 skill sword por 25 barras.\nskillaxe = adiciona 1 skill axe por 25 barras.\nskilldistance = adiciona 1 skill distance por 25 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 25 barras.\nmagiclevel = adiciona 1 magic level por 25 barras.\nmagiclevel2 = adiciona 2 magic level por 50 barras.\nskillclub2 = adiciona 2 skills club por 50 barras.\nskillsword2 = adiciona 2 skills sword por 50 barras.\nskillaxe2 = adiciona 2 skills axe por 50 barras.\nskilldistance2 = adiciona 2 skill distance por 50 barras.\nskillshielding2 = adiciona 2 skill shielding por 50 barras.\nremoverfrag = remove todos frags por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 15 barras.\nremoverblackskull = remove black skull por 25 barras.\n") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.") return TRUE end if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n1kk = 100 crystal coins por 1 barras.\nvip10 = 10 dias de vip por 50 barras.\nvip20 = 20 dias de vip por 100 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 3 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 5 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 7 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nexp = 100000000 pontos de experiencia por 30 barras.\nskillclub = adiciona 1 skill club por 25 barras.\nskillsword = adiciona 1 skill sword por 25 barras.\nskillaxe = adiciona 1 skill axe por 25 barras.\nskilldistance = adiciona 1 skill distance por 25 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 25 barras.\nmagiclevel = adiciona 1 magic level por 25 barras.\nmagiclevel2 = adiciona 2 magic level por 50 barras.\nskillclub2 = adiciona 2 skills club por 50 barras.\nskillsword2 = adiciona 2 skills sword por 50 barras.\nskillaxe2 = adiciona 2 skills axe por 50 barras.\nskilldistance2 = adiciona 2 skill distance por 50 barras.\nskillshielding2 = adiciona 2 skill shielding por 50 barras.\nremoverfrag = remove um frag por 10 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 15 barras.\nremoverblackskull = remove black skull por 25 barras.\n") return TRUE end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ if(param == "1kk") then if getPlayerItemCount(cid, 9971) >= 1 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2160, 100) doPlayerRemoveItem(cid, 9971, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "vip10") then if getPlayerItemCount(cid, 9971) >= 50 then doPlayerAddPremiumDays(cid, 10) doPlayerRemoveItem(cid, 9971, 50) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de [DONATE] com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "vip20") then if getPlayerItemCount(cid, 9971) >= 100 then doPlayerAddPremiumDays(cid, 20) doPlayerRemoveItem(cid, 9971, 100) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de [DONATE] com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "golden-set") then if getPlayerItemCount(cid, 9971) >= 3 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2471, 1) doAddContainerItem(bag, 2466, 1) doAddContainerItem(bag, 2470, 1) doAddContainerItem(bag, 2646, 1) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Golden-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "full-set") then if getPlayerItemCount(cid, 9971) >= 5 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2493, 1) doAddContainerItem(bag, 2472, 1) doAddContainerItem(bag, 2470, 1) doAddContainerItem(bag, 2514, 1) doPlayerRemoveItem(cid, 9971, 15) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Full-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "dragon-set") then if getPlayerItemCount(cid, 9971) >= 7 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2506, 1) doAddContainerItem(bag, 2492, 1) doAddContainerItem(bag, 2469, 1) doAddContainerItem(bag, 2516, 1) doPlayerRemoveItem(cid, 9971, 20) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Dragon-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "demon-set") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2493, 1) doAddContainerItem(bag, 2494, 1) doAddContainerItem(bag, 2495, 1) doAddContainerItem(bag, 2520, 1) doPlayerRemoveItem(cid, 9971, 20) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1 Demon-Set com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) 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 == "exp") then if getPlayerItemCount(cid, 9971) >= 10 then if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 1000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 10000) doPlayerRemoveItem(cid, 9971, 15) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end if getPlayerLevel(cid) >= 8 then doPlayerAddExperience(cid, 100000) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 100kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+30) return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 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 isElderDruid(cid) and not isMasterSorcerer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddMagLevel(cid, 1) 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 isKnight(cid) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 1, 1, round) 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 2, 1, round) 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 3, 1, round) 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) and not isRoyalPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 4, 1, round) 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 isRoyalPaladin(cid) and not isEliteKnight(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 5, 2, round) 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 == "magiclevel2") 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 isElderDruid(cid) and not isMasterSorcerer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddMagLevel(cid, 2) 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 == "skillclub2") then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if not isKnight(cid) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knight podem comprar skill de club.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 1, 2, round) 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 == "skillsword2") 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local sword = getPlayerSkillLevel(cid, SKILL_SWORD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 2, 2, round) 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 == "skillaxe2") 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) and not isEliteKnight(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.") return TRUE end if getPlayerItemCount(cid, 9971) >=25 then local pid = getPlayerGUID(cid) local axe = getPlayerSkillLevel(cid, SKILL_AXE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 3, 2, round) 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 == "skilldistance2") 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) and not isRoyalPaladin(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 4, 2, round) 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 == "skillshielding2") 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 isRoyalPaladin(cid) and not isEliteKnight(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e podem comprar skill de shield.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) doPlayerRemoveItem(cid, 9971, 25) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) doPlayerAddSkill(cid, 5, 2, round) 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 == "removerfrag") then if getPlayerItemCount(cid, 9971) >= 10 then doPlayerRemoveItem(cid, 9971, 10) db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;") setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.") 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 == "removerredskull") then if (getCreatureSkullType(cid) == SKULL_RED) == FALSE then doPlayerSendTextMessage(cid,27,"Você não está Red Skull para utilizar este comando.") return TRUE end if getPlayerItemCount(cid, 9971) >= 15 then doPlayerRemoveItem(cid, 9971, 15) db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid)) local skullEnd = getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE) setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Red Skull com sucesso.") 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 == "removerblackskull") then if (getCreatureSkullType(cid) == SKULL_BLACK) == FALSE then doPlayerSendTextMessage(cid,27,"Você não está Black Skull para utilizar este comando.") return TRUE end if getPlayerItemCount(cid, 9971) >= 25 then doPlayerRemoveItem(cid, 9971, 25) db.executeQuery("UPDATE `players` SET `skulltime`=0 WHERE `id` = "..getPlayerGUID(cid)) local skullEnd = getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, skullEnd, SKULL_NONE) setPlayerStorageValue(cid,11548,os.time()+0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu sua Black Skull com sucesso.") return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") return TRUE end end end
Postado Fevereiro 7, 2016 9 anos Autor @Sekk estou tendo o mesmo problema ainda, a script não adiciona o skill, será que teria que executar algo no phpmyadmin ? é só a compra de skills que não está pegando o resto ta funcionando 100 % , agradeço mt a colaboração deis de já
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.