iagonp 2 Postado Outubro 19, 2012 Share Postado Outubro 19, 2012 Alguem tem scripting de algum sistema para comprar skill ou magice level por barras? ou sabe como posso editar? pf alguem ajuda aew.. Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/ Compartilhar em outros sites More sharing options...
0 notle2012 233 Postado Outubro 19, 2012 Share Postado Outubro 19, 2012 que tal por npc compra skills? http://www.xtibia.com/forum/topic/191356-npc-que-edita-skills-um-de-cada-vez/ Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1366625 Compartilhar em outros sites More sharing options...
0 iagonp 2 Postado Outubro 19, 2012 Autor Share Postado Outubro 19, 2012 Quero com comandos EXP: (!comprar skillaxe etc...) alguem puder ajudar REP ++ vlw Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1366841 Compartilhar em outros sites More sharing options...
0 SmiX 265 Postado Outubro 19, 2012 Share Postado Outubro 19, 2012 (editado) Teste ai... fico meio grande pois faz tempo q fiz scripts.. local config = { fist_Add = 5, club_Add = 5, sword_Add = 5, axe_Add = 5, distance_Add = 5, shield_Add = 5, fishing_Add = 5, magicLevel_Add = 5, retire_do_player_esse_dinheiro = 500 } function onSay(cid, words, param) if param == "sword" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_FIST, config.fist_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "club" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_CLUB, config.club_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "sword" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_SWORD, config.sword_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "axe" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_AXE, config.axe_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "distance" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_DISTANCE, config.distance_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "shield" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_SHIELD, config.shield_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "fishing" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_FISHING, config.fishing_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "magic level" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_MAGLEVEL, config.magicLevel_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end end end function doPlayerSetSkill(cid, skill, amount) local pid = getPlayerGUID(cid) doRemoveCreature(cid,true) db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return TRUE end Xtibia(EksTIbia) bugou kkk Editado Outubro 19, 2012 por SmiX Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1366861 Compartilhar em outros sites More sharing options...
0 iagonp 2 Postado Outubro 19, 2012 Autor Share Postado Outubro 19, 2012 nao prestou, usei esse script e quando uso o comando gasta dinheiro e a skill volta pra 5..... =/ Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1366873 Compartilhar em outros sites More sharing options...
0 SmiX 265 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 Erro grave, ja ajeitei.... Esquece aquele e bota esse: local config = { fist_Add = 5, club_Add = 5, sword_Add = 5, axe_Add = 5, distance_Add = 5, shield_Add = 5, fishing_Add = 5, magicLevel_Add = 5, retire_do_player_esse_dinheiro = 500 } function onSay(cid, words, param) if param == "sword" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_FIST, getPlayerSkill(cid, SKILL_FIST) + config.fist_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "club" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkill(cid, SKILL_CLUB) + config.club_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "sword" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkill(cid, SKILL_SWORD) + config.sword_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "axe" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkill(cid, SKILL_AXE) + config.axe_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "distance" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkill(cid, SKILL_DISTANCE) + config.distance_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "shield" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_SHIELD, getPlayerSkill(cid, SKILL_SHIELD) + config.shield_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "fishing" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_FISHING, getPlayerSkill(cid, SKILL_FISHING) + config.fishing_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end elseif param == "magic level" then if doPlayerRemoveMoney(cid, config.retire_do_player_esse_dinheiro) then doPlayerSetSkill(cid, SKILL_MAGLEVEL, getPlayerSkill(cid, SKILL_MAGLEVEL) + config.magicLevel_Add) doSendMagicEffect(getThingPos(cid), 25) else doPlayerSendCancel(cid, "Sorry, is not possible.") end end end function doPlayerSetSkill(cid, skill, amount) local pid = getPlayerGUID(cid) doRemoveCreature(cid,true) db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return TRUE end Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1367314 Compartilhar em outros sites More sharing options...
0 KUNGLOW 14 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 <talkaction words="!comprar" script="comprar.lua"/> function onSay(cid, words, param) if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida 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 ~= "sd") and (param ~= "uh") and (param ~= "bebida") and (param ~= "superuh") and(param ~= "managigante") and (param ~= "explo") and (param ~= "vip10") and (param ~= "vip30") and (param ~= "golden-set") and (param ~= "full-set") and (param ~= "dragon-set") and (param ~= "demon-set") and (param ~= "divine staff") and (param ~= "divine axe") and (param ~= "divine club") and (param ~= "divine sword") and (param ~= "divine crossbow") and (param ~= "livro nivel 5") and (param ~= "super divine staff") and (param ~= "super divine axe") and (param ~= "super divine club") and (param ~= "super divine sword") and (param ~= "super divine crossbow") and (param ~= "livro nivel 6") and (param ~= "exp") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") and (param ~= "removerfrag") and (param ~= "removerredskull") and (param ~= "removerblackskull") and (param ~= "novark") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\n1kk = 100 crystal coins por 10 barras.\nsd = 4000 em SD por 10 barras.\nuh = 6000 em UH por 10 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 10 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 15 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 20 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 20 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine staff = super divine staff por 60 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nexp = 100000000 pontos de experiencia por 10 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 5 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 5 barras.\nremoverblackskull = remove black skull por 10 barras.\nnovark = gera uma nova RK para sua account por 10 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 10 barras.\nsd = 4000 em SD por 10 barras.\nuh = 6000 em UH por 10 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ngolden-set = golden helmet, golden armor, golden legs, golden boots por 10 barras.\nfull-set = demon helmet, magic plate armor, golden legs, mastermind shield por 15 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\ndragon-set = dragon scale helmet, dragon scale mail, dragon scale legs, dragon shield por 20 barras.\ndemon-set = demon helmet, demon armor, demon legs, demonrage sword, demon shield por 20 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine staff = super divine staff por 60 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nexp = 100000000 pontos de experiencia por 10 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove um frag por 2 barras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nremoverredskull = remove red skull por 5 barras.\nremoverblackskull = remove black skull por 10 barras.\nnovark = gera uma nova RK para sua account por 10 barras.\n") return TRUE end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ if(param == "1kk") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2160, 100) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "bebida") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 18394, 1) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doAddContainerItem(bag, 12328, 5) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 40 bebidas da satisfação com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "sd") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 5926, 1) doAddContainerItem(bag, 2268, 2000) local bag = doPlayerAddItem(cid, 5926, 1) doAddContainerItem(bag, 2268, 2000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 4k de SD com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "superuh") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 5926, 5) doAddContainerItem(bag, 2275, 5000) local bag = doPlayerAddItem(cid, 5926, 5) doAddContainerItem(bag, 2275, 5000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10k de SuperUH com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "managigante") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 5926, 5) doAddContainerItem(bag, 7590, 5000) local bag = doPlayerAddItem(cid, 5926, 5) doAddContainerItem(bag, 7590, 5000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10k de Frascos de Mana Gigantes com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "uh") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 2002, 1) doAddContainerItem(bag, 2273, 2000) local bag = doPlayerAddItem(cid, 2002, 1) doAddContainerItem(bag, 2273, 2000) local bag = doPlayerAddItem(cid, 2002, 1) doAddContainerItem(bag, 2273, 2000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de UH com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "explo") then if getPlayerItemCount(cid, 9971) >= 10 then local bag = doPlayerAddItem(cid, 2001, 1) doAddContainerItem(bag, 2313, 2000) local bag = doPlayerAddItem(cid, 2001, 1) doAddContainerItem(bag, 2313, 2000) local bag = doPlayerAddItem(cid, 2001, 1) doAddContainerItem(bag, 2313, 2000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de Explosion com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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) >= 5 then doPlayerAddPremiumDays(cid, 10) doPlayerRemoveItem(cid, 9971, 5) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "vip30") then if getPlayerItemCount(cid, 9971) >= 10 then doPlayerAddItem(cid, 16101, 1) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou um premium scroll de 30 dias de VIP. Para usa-lo basta dar use. Lembrando (premium scrolls podem ser trocados e vendidos).") setPlayerStorageValue(cid,11548,os.time()+0) 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) >= 10 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()+0) 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) >= 15 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()+0) 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) >= 20 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()+0) 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) >= 20 then local bag = doPlayerAddItem(cid, 1997, 1) doAddContainerItem(bag, 2493, 1) doAddContainerItem(bag, 2494, 1) doAddContainerItem(bag, 2495, 1) doAddContainerItem(bag, 2520, 1) doAddContainerItem(bag, 7382, 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()+0) 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 == "divine staff") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 6534, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine staff com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") end return true end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "divine axe") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 7453, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine axe com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "divine club") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 7392, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine club com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "divine sword") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 7418, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine sword com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "divine crossbow") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8853, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um divine crossbow com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "livro nivel 5") then if getPlayerItemCount(cid, 9971) >= 30 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8904, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 30) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nível 5 com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "super divine staff") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8922, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine staff com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "super divine axe") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8926, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "super divine club") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 7423, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine club com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "super divine sword") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 7403, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine sword com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "super divine crossbow") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8851, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine crossbow com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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 == "livro nivel 6") then if getPlayerItemCount(cid, 9971) >= 60 then local bag = doPlayerAddItem(cid, 1997, 1) local new_item = doAddContainerItem(bag, 8921, 1) doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..".") doPlayerRegisterSerial(cid, getThing(new_item)) doPlayerRemoveItem(cid, 9971, 60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nível 6 com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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) >= 699 then doPlayerAddExperience(cid, 710000000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 1kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) return TRUE end if getPlayerLevel(cid) >= 349 then doPlayerAddExperience(cid, 710000000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) return TRUE end if getPlayerLevel(cid) >= 1 then doPlayerAddExperience(cid, 710000000) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 100kk de exp com sucesso.") setPlayerStorageValue(cid,11548,os.time()+0) 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, true) >= 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 isMasterInfernalist(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.query("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, true) >= 350 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if getPlayerVocation(5) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 1 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB, true) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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 getPlayerMagLevel(cid, true) >= 200 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, true) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("UPDATE `players` SET `maglevel` = `maglevel` + 11 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 == "skilldistance") then if getPlayerSkillLevel(cid, SKILL_DISTANCE, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 1) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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, true) >= 196 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.") return TRUE end if getPlayerVocation(1,2,6) 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.query("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, true) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local club = getPlayerSkillLevel(cid, SKILL_CLUB, true) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("UPDATE `player_skills` SET `value` = " .. (club + 340) .. ", `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, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("UPDATE `player_skills` SET `value` = " .. (axe + 340) .. ", `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, true) >= 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, true) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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, true) >= 341 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.") return TRUE end if getPlayerVocation(3,4,5) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.") return TRUE end if getPlayerItemCount(cid, 9971) >= 10 then local pid = getPlayerGUID(cid) local shield = getPlayerSkillLevel(cid, SKILL_SHIELD, true) doPlayerRemoveItem(cid, 9971, 10) setPlayerStorageValue(cid,11548,os.time()+0) doRemoveCreature(cid) db.query("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 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "removerfrag") then if getPlayerItemCount(cid, 9971) >= 2 then doPlayerRemoveItem(cid, 9971, 2) db.query("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) >= 5 then doPlayerRemoveItem(cid, 9971, 5) db.query("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) >= 10 then doPlayerRemoveItem(cid, 9971, 10) db.query("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 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if(param == "novark") then if getPlayerItemCount(cid, 9971) >= 10 then setPlayerRecoveryKey(cid) doPlayerRemoveItem(cid, 9971, 10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ATENÇÃO! Esta será a única vez que sua RK será mostrada, portanto, anote-a em um lugar seguro fora de seu computador!\n" .. setPlayerRecoveryKey(cid) .. "") setPlayerStorageValue(cid,11548,os.time()+0) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.") end end return TRUE end Este está FULL RadBR. Com algumas alterações minhas. Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1367371 Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1367373 Compartilhar em outros sites More sharing options...
0 iagonp 2 Postado Outubro 20, 2012 Autor Share Postado Outubro 20, 2012 mano nao ta prestando pra comprar nao... o char desloga gasta a barra mas nao comprar a skill e alguns comandos nao estão prestando =/ Link para o comentário https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/#findComment-1367516 Compartilhar em outros sites More sharing options...
Pergunta
iagonp 2
Alguem tem scripting de algum sistema para comprar skill ou magice level por barras? ou sabe como posso editar? pf alguem ajuda aew..
Link para o comentário
https://xtibia.com/forum/topic/196853-d%C3%BAvida-scripting-coloar-sistema-de-compras-de-skill-por-barras/Compartilhar em outros sites
8 respostass a esta questão
Posts Recomendados