Ir para conteúdo
  • Cadastre-se

(Resolvido)Alguem Poderia ajuda no Starter.lua


Ir para solução Resolvido por Felyth,

Posts Recomendados

Eu estou tentando tirar dos itens iniciais o hundred dollar(id:2152),mas ja tentei de tudo no starter ja tirei a linha ja pus outro id,ja mudei a quantidade mas nenhuma das minhas tentativas dao certo,o hundred dollar continua como se eu nao tivesse mudado.

 

local starterpokes = {
["Bulbasaur"] = {x = 53, y = 71, z = 7},
["Squirtle"] = {x = 50, y = 71, z = 7},
["Charmander"] = {x = 47, y = 71, z = 7},
["Turtwig"] = {x = 54, y = 71, z = 7},
["Piplup"] = {x = 51, y = 71, z = 7},
["Chimchar"] = {x = 48, y = 71, z = 7},
}
 
local level = 5
local extrastr = 1.5
local btype = "normal"
 
function onUse(cid, item, frompos, item2, topos)
 
if getPlayerLevel(cid) > 1 then
return true
end
 
local pokemon = ""
 
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
 
if pokemon == "" then return true end
 
local gender = getRandomGenderByName(pokemon)
 
local mypoke = getPokemonStatus(pokemon)
 
if not mypoke then return true end
 
local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
 
 
doPlayerAddItem(cid, 2152, 100)
doPlayerAddItem(cid, 2392, 20)
doPlayerAddItem(cid, 12345, 20)
doPlayerAddItem(cid, 12331, 1)
 
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "firstpoke", getCreatureName(cid))
doPlayerAddItemEx(cid, item, true)
 
doTransformItem(item, pokeballs[btype].on)
 
doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")
 
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
 
 
return TRUE
end

Link para o post
Compartilhar em outros sites
  • Administrador

Seu server já começa com o pokemon ou tem que clicar em algum bau ?

Usa isso

local starterpokes = {
["Bulbasaur"] = {x = 53, y = 71, z = 7},
["Squirtle"] = {x = 50, y = 71, z = 7},
["Charmander"] = {x = 47, y = 71, z = 7},
["Turtwig"] = {x = 54, y = 71, z = 7},
["Piplup"] = {x = 51, y = 71, z = 7},
["Chimchar"] = {x = 48, y = 71, z = 7},
}
 
local level = 5
local extrastr = 1.5
local btype = "normal"
 
function onUse(cid, item, frompos, item2, topos)
 
if getPlayerLevel(cid) > 1 then
return true
end
 
local pokemon = ""
 
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
 
if pokemon == "" then return true end
 
local gender = getRandomGenderByName(pokemon)
 
local mypoke = getPokemonStatus(pokemon)
 
if not mypoke then return true end
 
local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
 
 
doPlayerAddItem(cid, 2392, 20)
doPlayerAddItem(cid, 12345, 20)
doPlayerAddItem(cid, 12331, 1)
 
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "firstpoke", getCreatureName(cid))
doPlayerAddItemEx(cid, item, true)
 
doTransformItem(item, pokeballs[btype].on)
 
doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")
 
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
 
 
return TRUE
end
Editado por Erimyth (veja o histórico de edições)

TibiaKing Team- KingTópicos
www.tibiaking.com

Link para o post
Compartilhar em outros sites

Nao ele tem que passar por uma teleport ai ganha o poke e os itens. Eu coloquei o script mais continua ganhando o hundred dollar under

Editado por vitorcru (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Administrador
  • Solução

Testa ai aguardando resposta.se não funcionar é porque esta usando outro scripts pra ganhar os item.

TibiaKing Team- KingTópicos
www.tibiaking.com

Link para o post
Compartilhar em outros sites

Testa ai aguardando resposta.se não funcionar é porque esta usando outro scripts pra ganhar os item.

Nao deu nao under continua ganhando o hundread,no action.xml mostra que ta usando esse script olha

<?xml version="1.0" encoding="UTF-8"?>
<actions>
<!-- Quests -->
<action actionid="2000" event="script" value="quests/system.lua"/>
<action actionid="2001" event="script" value="quests/system.lua"/>
<action uniqueid="7555" script="chuva.lua" />
<!-- Weapons enchanting (Gems) -->
<action itemid="2150" event="script" value="other/enchanting.lua"/>
<action itemid="2149" event="script" value="other/enchanting.lua"/>
<action itemid="7759" event="script" value="other/enchanting.lua"/>
<action itemid="7760" event="script" value="other/enchanting.lua"/>
<action itemid="7761" event="script" value="other/enchanting.lua"/>
<action itemid="7762" event="script" value="other/enchanting.lua"/>
        <action itemid="165" event="script" value="carro um.lua"/>
        <action itemid="166" event="script" value="carro dois.lua"/>
        <action itemid="163" event="script" value="moto um.lua"/>
        <action itemid="164" event="script" value="moto dois.lua"/>
 
<!-- Tools -->
<action itemid="2420" event="script" value="tools/machete.lua"/>
<action itemid="2442" event="script" value="tools/machete.lua"/>
<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="10223" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="2554" event="script" value="tools/shovel.lua"/>
<action itemid="5710" event="script" value="tools/shovel.lua"/>
<action itemid="2120" event="script" value="tools/rope.lua"/>
<action itemid="7731" event="script" value="tools/rope.lua"/>
<action itemid="2553" event="script" value="tools/pick.lua"/>
<action itemid="5908" event="script" value="tools/obsidian_knife.lua"/>
<action itemid="5942" event="script" value="tools/blessed_wooden_stake.lua"/>
 
<!-- Liquids -->
<action itemid="1775" event="script" value="liquids/containers.lua"/>
<action itemid="2005" event="script" value="liquids/containers.lua"/>
<action itemid="2006" event="script" value="liquids/containers.lua"/>
<action itemid="2007" event="script" value="liquids/containers.lua"/>
<action itemid="2008" event="script" value="liquids/containers.lua"/>
<action itemid="2009" event="script" value="liquids/containers.lua"/>
<action itemid="2011" event="script" value="liquids/containers.lua"/>
<action itemid="2012" event="script" value="liquids/containers.lua"/>
<action itemid="2013" event="script" value="liquids/containers.lua"/>
<action itemid="2014" event="script" value="liquids/containers.lua"/>
<action itemid="2015" event="script" value="liquids/containers.lua"/>
<action itemid="2023" event="script" value="liquids/containers.lua"/>
<action itemid="2031" event="script" value="liquids/containers.lua"/>
<action itemid="2032" event="script" value="liquids/containers.lua"/>
<action itemid="2033" event="script" value="liquids/containers.lua"/>
<action itemid="2034" event="script" value="liquids/containers.lua"/>
<action itemid="2562" event="script" value="liquids/containers.lua"/>
<action itemid="2574" event="script" value="liquids/containers.lua"/>
<action itemid="2575" event="script" value="liquids/containers.lua"/>
<action itemid="2576" event="script" value="liquids/containers.lua"/>
<action itemid="2577" event="script" value="liquids/containers.lua"/>
<action itemid="3941" event="script" value="liquids/containers.lua"/>
<action itemid="3942" event="script" value="liquids/containers.lua"/>
<action itemid="5553" event="script" value="liquids/containers.lua"/>
<action itemid="10150" event="script" value="liquids/containers.lua"/>
<action itemid="6558" event="script" value="liquids/demonic_blood.lua"/>
<action itemid="7588-7591;8472-8473;7618;7620;8704" event="script" value="liquids/potions.lua"/>
<action itemid="7439" event="script" value="liquids/berserk_potion.lua"/>
<action itemid="7440" event="script" value="liquids/mastermind_potion.lua"/>
<action itemid="7443" event="script" value="liquids/bullseye_potion.lua"/>
<action itemid="8474" event="script" value="liquids/antidote_potion.lua"/>
 
<!-- Food -->
<action itemid="2362;2666-2691" event="script" value="other/food.lua"/>
<action fromid="2695" toid="2696" event="script" value="other/food.lua"/>
<action fromid="2787" toid="2796" event="script" value="other/food.lua"/>
<action itemid="5097" event="script" value="other/food.lua"/>
<action itemid="6125" event="script" value="other/food.lua"/>
<action itemid="6278" event="script" value="other/food.lua"/>
<action itemid="6279" event="script" value="other/food.lua"/>
<action itemid="6394" event="script" value="other/food.lua"/>
<action itemid="6501" event="script" value="other/food.lua"/>
<action fromid="6541" toid="6545" event="script" value="other/food.lua"/>
<action itemid="6574" event="script" value="other/food.lua"/>
<action itemid="7158" event="script" value="other/food.lua"/>
<action itemid="7159" event="script" value="other/food.lua"/>
<action fromid="7372" toid="7377" event="script" value="other/food.lua"/>
<action itemid="7909" event="script" value="other/food.lua"/>
<action fromid="8838" toid="8845" event="script" value="other/food.lua"/>
<action itemid="8847" event="script" value="other/food.lua"/>
<action itemid="12211;12213-12222" event="script" value="other/food.lua"/>
 
<!-- Increase/Decrease ItemId -->
<action itemid="461" event="function" value="increaseItemId"/>
<action itemid="462" event="function" value="decreaseItemId"/>
<action itemid="1873" event="function" value="increaseItemId"/>
<action itemid="1874" event="function" value="decreaseItemId"/>
<action itemid="1875" event="function" value="increaseItemId"/>
<action itemid="1876" event="function" value="decreaseItemId"/>
<action itemid="2162" event="function" value="increaseItemId"/>
<action itemid="2163" event="function" value="decreaseItemId"/>
<action itemid="3743" event="function" value="increaseItemId"/>
<action itemid="3744" event="function" value="decreaseItemId"/>
<action itemid="3947" event="function" value="increaseItemId"/>
<action itemid="3948" event="function" value="decreaseItemId"/>
<action itemid="1479" event="function" value="increaseItemId"/>
<action itemid="1480" event="function" value="decreaseItemId"/>
<action itemid="2037" event="function" value="increaseItemId"/>
<action itemid="2038" event="function" value="decreaseItemId"/>
<action itemid="2039" event="function" value="increaseItemId"/>
<action itemid="2040" event="function" value="decreaseItemId"/>
<action itemid="2058" event="function" value="increaseItemId"/>
<action itemid="2059" event="function" value="decreaseItemId"/>
<action itemid="2060" event="function" value="increaseItemId"/>
<action itemid="2061" event="function" value="decreaseItemId"/>
<action itemid="2066" event="function" value="increaseItemId"/>
<action itemid="2067" event="function" value="decreaseItemId"/>
<action itemid="2068" event="function" value="increaseItemId"/>
<action itemid="2069" event="function" value="decreaseItemId"/>
<action itemid="2064" event="function" value="increaseItemId"/>
<action itemid="2065" event="function" value="decreaseItemId"/>
<action itemid="2096" event="function" value="increaseItemId"/>
<action itemid="2097" event="function" value="decreaseItemId"/>
<action itemid="1786" event="function" value="increaseItemId"/>
<action itemid="1787" event="function" value="decreaseItemId"/>
<action itemid="1788" event="function" value="increaseItemId"/>
<action itemid="1789" event="function" value="decreaseItemId"/>
<action itemid="1790" event="function" value="increaseItemId"/>
<action itemid="1791" event="function" value="decreaseItemId"/>
<action itemid="1792" event="function" value="increaseItemId"/>
<action itemid="1793" event="function" value="decreaseItemId"/>
<action itemid="1634" event="function" value="increaseItemId"/>
<action itemid="1635" event="function" value="decreaseItemId"/>
<action itemid="1636" event="function" value="increaseItemId"/>
<action itemid="1637" event="function" value="decreaseItemId"/>
<action itemid="1638" event="function" value="increaseItemId"/>
<action itemid="1639" event="function" value="decreaseItemId"/>
<action itemid="1640" event="function" value="increaseItemId"/>
<action itemid="1641" event="function" value="decreaseItemId"/>
<action itemid="7058" event="function" value="increaseItemId"/>
<action itemid="7059" event="function" value="decreaseItemId"/>
<action itemid="8684" event="function" value="increaseItemId"/>
<action itemid="8685" event="function" value="decreaseItemId"/>
<action itemid="8686" event="function" value="increaseItemId"/>
<action itemid="8687" event="function" value="decreaseItemId"/>
<action itemid="8688" event="function" value="increaseItemId"/>
<action itemid="8689" event="function" value="decreaseItemId"/>
<action itemid="8690" event="function" value="increaseItemId"/>
<action itemid="8691" event="function" value="decreaseItemId"/>
<action itemid="9575" event="function" value="increaseItemId"/>
<action itemid="9576" event="function" value="decreaseItemId"/>
<action itemid="9577" event="function" value="increaseItemId"/>
<action itemid="9578" event="function" value="decreaseItemId"/>
<action itemid="9579" event="function" value="increaseItemId"/>
<action itemid="9580" event="function" value="decreaseItemId"/>
<action itemid="9581" event="function" value="increaseItemId"/>
<action itemid="9582" event="function" value="decreaseItemId"/>
<action itemid="9624" event="function" value="increaseItemId"/>
<action itemid="9625" event="function" value="decreaseItemId"/>
<action itemid="9747" event="function" value="increaseItemId"/>
<action itemid="9748" event="function" value="decreaseItemId"/>
<action itemid="9749" event="function" value="increaseItemId"/>
<action itemid="9750" event="function" value="decreaseItemId"/>
<action itemid="9825" event="function" value="increaseItemId"/>
<action itemid="9826" event="function" value="decreaseItemId"/>
<action itemid="9827" event="function" value="increaseItemId"/>
<action itemid="9828" event="function" value="decreaseItemId"/>
<action itemid="9973" event="function" value="increaseItemId"/>
<action itemid="9974" event="function" value="decreaseItemId"/>
<action itemid="10044" event="function" value="increaseItemId"/>
<action itemid="10045" event="function" value="decreaseItemId"/>
 
<!-- Spellbooks -->
<action itemid="2175" event="script" value="other/spellbook.lua"/>
<action itemid="6120" event="script" value="other/spellbook.lua"/>
<action fromid="8900" toid="8904" event="script" value="other/spellbook.lua"/>
<action itemid="8918" event="script" value="other/spellbook.lua"/>
 
<!-- Change gold -->
<action itemid="2148;2152;2160;12416" event="script" value="other/changegold.lua"/>
 
<!-- Construction kits -->
<action fromid="3901" toid="3938" event="script" value="other/constructionkits.lua"/>
<action fromid="5086" toid="5088" event="script" value="other/constructionkits.lua"/>
<action fromid="6114" toid="6115" event="script" value="other/constructionkits.lua"/>
<action fromid="6372" toid="6373" event="script" value="other/constructionkits.lua"/>
<action fromid="7960" toid="7962" event="script" value="other/constructionkits.lua"/>
<action fromid="8692" toid="8693" event="script" value="other/constructionkits.lua"/>
<action itemid="7503" event="script" value="other/constructionkits.lua"/>
<action itemid="7700" event="script" value="other/constructionkits.lua"/>
 
<!-- Bed construction kits -->
<action fromid="7904" toid="7907" event="script" value="other/furniturebeds.lua"/>
 
<!-- Music, instruments -->
<action fromid="2070" toid="2085" event="script" value="other/music.lua"/>
<action itemid="2095" event="script" value="other/music.lua"/>
<action itemid="2332" event="script" value="other/music.lua"/>
<action itemid="2364" event="script" value="other/music.lua"/>
<action fromid="2367" toid="2374" event="script" value="other/music.lua"/>
<action fromid="3951" toid="3953" event="script" value="other/music.lua"/>
<action itemid="3957" event="script" value="other/music.lua"/>
<action itemid="5786" event="script" value="other/music.lua"/>
<action itemid="6572" event="script" value="other/music.lua"/>
 
<!-- Teleport (stairs, ladders) -->
<action itemid="430" event="script" value="other/teleport.lua"/>
<action itemid="1368" event="script" value="other/teleport.lua"/>
<action itemid="1369" event="script" value="other/teleport.lua"/>
<action itemid="1386" event="script" value="other/teleport.lua"/>
<action itemid="3678" event="script" value="other/teleport.lua"/>
<action itemid="5543" event="script" value="other/teleport.lua"/>
<action itemid="8580" event="script" value="other/teleport.lua"/>
<action itemid="8599" event="script" value="other/teleport.lua"/>
<action itemid="10035" event="script" value="other/teleport.lua"/>
 
<!-- Destroy -->
<action id="2321;2390-2398;2400-2404;2406-2409;2411-2417;2419;2421-2441;2443-2454;3961-3964;3966;4846;6101;6528;6553;7379-7392;7402-7437;7449;7451-7456;7744-7758;7763-7777;7854-7883;7958;8601-8602;8924-8932;10293" event="script" value="other/destroy.lua"/>
 
<!-- Bread Creating -->
<action itemid="2692" event="script" value="other/createbread.lua"/>
<action itemid="2694" event="script" value="other/createbread.lua"/>
 
<!-- Windows -->
<action fromid="5303" toid="5305" event="script" value="other/windows.lua"/>
<action fromid="6436" toid="6473" event="script" value="other/windows.lua"/>
<action fromid="6788" toid="6791" event="script" value="other/windows.lua"/>
<action fromid="7025" toid="7032" event="script" value="other/windows.lua"/>
<action fromid="10264" toid="10267" event="script" value="other/windows.lua"/>
<action fromid="10488" toid="10491" event="script" value="other/windows.lua"/>
 
<!-- Doors -->
<action fromid="1209" toid="1214" event="script" value="other/doors.lua"/>
<action fromid="1219" toid="1262" event="script" value="other/doors.lua"/>
<action fromid="1539" toid="1542" event="script" value="other/doors.lua"/>
<action fromid="2086" toid="2092" event="script" value="other/doors.lua"/>
<action fromid="3535" toid="3552" event="script" value="other/doors.lua"/>
<action fromid="4913" toid="4918" event="script" value="other/doors.lua"/>
<action fromid="5082" toid="5085" event="script" value="other/doors.lua"/>
<action fromid="5098" toid="5145" event="script" value="other/doors.lua"/>
<action fromid="5278" toid="5295" event="script" value="other/doors.lua"/>
<action fromid="5515" toid="5518" event="script" value="other/doors.lua"/>
<action fromid="5732" toid="5737" event="script" value="other/doors.lua"/>
<action fromid="5745" toid="5749" event="script" value="other/doors.lua"/>
<action fromid="6192" toid="6209" event="script" value="other/doors.lua"/>
<action fromid="6249" toid="6266" event="script" value="other/doors.lua"/>
<action fromid="6795" toid="6802" event="script" value="other/doors.lua"/>
<action fromid="6891" toid="6908" event="script" value="other/doors.lua"/>
<action fromid="7033" toid="7050" event="script" value="other/doors.lua"/>
<action fromid="7054" toid="7057" event="script" value="other/doors.lua"/>
<action fromid="8541" toid="8558" event="script" value="other/doors.lua"/>
<action fromid="9165" toid="9184" event="script" value="other/doors.lua"/>
<action fromid="9267" toid="9284" event="script" value="other/doors.lua"/>
<action itemid="10032" event="script" value="other/doors.lua"/>
<action itemid="10091" event="script" value="other/doors.lua"/>
<action fromid="10268" toid="10285" event="script" value="other/doors.lua"/>
<action fromid="10468" toid="10486" event="script" value="other/doors.lua"/>
<action fromid="10774" toid="10776" event="script" value="other/doors.lua"/>
<action fromid="10779" toid="10785" event="script" value="other/doors.lua"/>
<action fromid="10788" toid="10791" event="script" value="other/doors.lua"/>
 
<!-- Watch -->
<action itemid="2036" event="script" value="other/watch.lua"/>
<action fromid="1728" toid="1731" event="script" value="other/watch.lua"/>
<action itemid="1877" event="script" value="other/watch.lua"/>
<action fromid="6091" toid="6092" event="script" value="other/watch.lua"/>
<action itemid="8187" event="script" value="other/watch.lua"/>
 
<!-- Decay To -->
<action fromid="2041" toid="2042" event="script" value="other/decayto.lua"/>
<action fromid="2044" toid="2045" event="script" value="other/decayto.lua"/>
<action fromid="2047" toid="2048" event="script" value="other/decayto.lua"/>
<action fromid="2050" toid="2055" event="script" value="other/decayto.lua"/>
<action fromid="5812" toid="5813" event="script" value="other/decayto.lua"/>
<action itemid="7183" event="script" value="other/decayto.lua"/>
<action itemid="9006" event="script" value="other/decayto.lua"/>
<action fromid="9976" toid="9979" event="script" value="other/decayto.lua"/>
 
<!-- Other -->
<action itemid="2114" event="script" value="other/piggybank.lua"/>
<action uniqueid="5353" script="other/coca cola.lua" />
<action fromid="6570" toid="6571" event="script" value="other/surprisebag.lua"/>
<action fromid="5792" toid="5797" event="script" value="other/dice.lua"/>
<action itemid="6576" event="script" value="other/fireworksrocket.lua"/>
<action itemid="6578" event="script" value="other/partyhat.lua"/>
<action itemid="2785" event="script" value="other/blueberrybush.lua"/>
<action itemid="2579" event="script" value="other/trap.lua"/>
<action uniqueid="5252" script="other/transdec.lua" />
<action itemid="6512;8982;9019;9693;2322" event="script" value="vitaminas.lua"/>
<action uniqueid="5950" event="script" value="quests/saffron quest.lua"/>
<action uniqueid="5951" event="script" value="quests/cerulean quest.lua"/>
<action uniqueid="5952" event="script" value="quests/pewter quest.lua"/>
<action uniqueid="5953" event="script" value="quests/viridian quest.lua"/>
<action uniqueid="5954" event="script" value="quests/cinnabar quest.lua"/>
<action uniqueid="5955" event="script" value="quests/vermilion quest.lua"/>
<action uniqueid="5956" event="script" value="quests/fuchsia quest.lua"/>
<action uniqueid="5957" event="script" value="quests/lavender quest um.lua"/>
<action uniqueid="5958" event="script" value="quests/lavender quest dois.lua"/>
<action uniqueid="5959" event="script" value="quests/box+4.lua"/>
<action uniqueid="1957" event="script" value="quests/tasertoquest.lua"/>
<action uniqueid="5960" event="script" value="quests/box+2.lua"/>
<action uniqueid="5961" event="script" value="quests/box+3.lua"/>
<action uniqueid="5962" event="script" value="quests/box+1.lua"/>
<action uniqueid="5963" event="script" value="quests/new quest 1.lua"/>
<action uniqueid="5964" event="script" value="quests/new quest 2.lua"/>
<action uniqueid="5965" event="script" value="quests/new quest 3.lua"/>
<action uniqueid="5966" event="script" value="quests/new quest 4.lua"/>
<action uniqueid="5967" event="script" value="quests/new quest 5.lua"/>
<action uniqueid="5968" event="script" value="quests/new quest 6.lua"/>
<action uniqueid="5969" event="script" value="quests/new quest 7.lua"/>
        <action uniqueid="5981" event="script" value="quests/new quest 9.lua"/>
        <action uniqueid="5973" event="script" value="quests/new quest 11.lua"/>
        <action uniqueid="5971" event="script" value="quests/new quest 10.lua"/>
        <action uniqueid="5988" event="script" value="quests/new quest 13.lua"/>
        <action uniqueid="5977" event="script" value="quests/new quest 12.lua"/>
        <action uniqueid="5985" event="script" value="quests/new quest 14.lua"/>
        <action uniqueid="5995" event="script" value="quests/new quest 15.lua"/>
        <action uniqueid="5990" event="script" value="quests/new quest 16.lua"/>
<action uniqueid="14495" event="script" value="quests/bike quest.lua"/>
<action itemid="3515" event="script" value="pt valey.lua"/>
<action itemid="3514" event="script" value="pt valey.lua"/>
<action uniqueid="36667;36668;36669" event="script" value="quests/Triple quest.lua"/>
<action uniqueid="9874" event="script" value="quests/card quest.lua"/>
<action itemid="12730;12731;12743;12870;12871;12872;12873;12874;12875;12876;12877;12878;12879;12880;12881;12882;12883;12884;12885;12886;12887;12888;12889;12890;12891;12892;12893;12894;12895;12896;12897;12898;12899;12900;12901;12902;12903;12904;12905;12906;12907;12908;12909;12910;12911;12912;12913;12914;12915;12916;12917;12918;12919;12920;12921;12922;12923;12924;12925;12926;12927;12928;12929;12930;12931;12932;12933;12934;12935;12936;12937;12938;12939;12940;12941;12942;12943;12944" event="script" value="addons.lua"/>
<action uniqueid="1509" script="quests/keychest.lua"/>
<action uniqueid="1510" script="quests/keychest.lua"/>
<action itemid="12778" event="script" value="Addon Box strong.lua"/>
<action itemid="12779" event="script" value="Addon Box weak.lua"/>
<action itemid="12785" event="script" value="card.lua"/>
 
<action itemid="5791" event="script" value="other/stuffeddragon.lua"/>
<action itemid="6566" event="script" value="other/stuffeddragon.lua"/>
 
 
-- POTIONS / ANTIDOTE
<action itemid="12343;12345-12348" event="script" value="potion.lua" allowfaruse="1" blockwalls="1"/>
<action itemid="12349" event="script" value="antidote.lua" allowfaruse="1" blockwalls="1"/>
<action itemid="12344" event="script" value="revive.lua" allowfaruse="1" blockwalls="1"/>
 
-- BOXES (poke inicial)
<action itemid="1740" event="script" value="starter.lua"/>
 
-- POKEMON PRIZE BOXES / RARE CANDY
<action itemid="11638;11639;11640;11641" event="script" value="box.lua"/>
        <action itemid="12783;12782;;12331;12784;12781" event="script" value="box2.lua"/>
<action itemid="6569" event="script" value="rarecandy.lua" allowfaruse="1"/>
 
-- POKEDEX
<action itemid="2382" event="script" value="pokedex.lua" allowfaruse="1" blockwalls="1"/>
<action itemid="7385" event="script" value="pokeinfo.lua"/>
 
-- LOJA DE ROUPAS
<action itemid="3896;3897;3867;3868" event="script" value="roupas.lua"/>
 
-- GO/BACK E CATCH
<action itemid="11826-11837;11737-11748;556" event="script" value="goback.lua"/>
<action itemid="2391-2394-556" event="script" value="catch.lua" allowfaruse="1"/>
 
-- BIKE
<action itemid="2547" event="script" value="Bike.lua"/>
 
 
-- TV / CAM
<action itemid="11416-11418;11395-11398;11401-11404" event="script" value="television.lua"/>
<action itemid="12330" event="script" value="camera.lua"/>
 
-- PC
<action itemid="11462-11469" event="script" value="computer.lua"/>
 
-- BOOST MACHINE
<action itemid="12352-12357" event="script" value="boost.lua"/>
 
-- ORDER
<action itemid="2550" event="script" value="order.lua" allowfaruse="1" blockwalls="0"/>
 
-- PEDRAS DE EVO
<action itemid="11441-11454;12232;12242;12244;12417;12419" event="script" value="evolution.lua" allowfaruse="1"/>
 
  </actions>

Link para o post
Compartilhar em outros sites
  • Administrador

faz  o seguinte muda isso cria um novo script já que o player começa sem nada você tira esse tp e cria isso.

data/actions/actions.xml

<action actionid="1740" event="script" value="starter.lua"/>

 

local starterpokes = {
["Bulbasaur"] = {x = 47, y = 44, z = 7},
["Squirtle] = {x = 49, y = 44, z = 7},
["Charmander"] = {x = 51, y = 44, z = 7},
}

local btype = "Icone"

function onUse(cid, item, frompos, item2, topos)


    local pokemon = ""

    for a, b in pairs (starterpokes) do
        if isPosEqualPos(topos, b) then
            pokemon = a
        end
    end
if pokemon == "" then return true end
    
    doPlayerSendTextMessage(cid, 27, "Você recebeu seu primeiro pokemon e um kit inicial...Boa Sorte em sua Jornada.")

addPokeToPlayer(cid, pokemon, 0, nil, btype, true)
doPlayerAddItem(cid, 2392, 20)
doPlayerAddItem(cid, 12345, 20)
doPlayerAddItem(cid, 12331, 1)
setPlayerStorageValue(cid, 8955, 1)

    doSendMagicEffect(getThingPos(cid), 29)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doSendMagicEffect(getThingPos(cid), 27)
    doSendMagicEffect(getThingPos(cid), 29)
    

return TRUE
end

 

 

substitui o seu starter.lua por esse em data/actions/starter.lua

certo para configurar abra seu RME,crie uma nova área pequena onde o player ira começar.

AZUL são as POS dos baus,são tres coloque as 3

VERMELHO Nome dos pokemons que irão começar.

Após fazer isso vá no seu rme adicione nos baus a actiond ID:1740 após isso se você usa sqlite mude a posição de spawn no config.lua para o local que você criou,se usa mysql va na db do server aba players e muda a posição do spawn do Pokemon Trainer Sample.

Editado por Erimyth (veja o histórico de edições)

TibiaKing Team- KingTópicos
www.tibiaking.com

Link para o post
Compartilhar em outros sites

faz  o seguinte muda isso cria um novo script já que o player começa sem nada você tira esse tp e cria isso.

data/actions/actions.xml

 

 

substitui o seu starter.lua por esse em data/actions/starter.lua

certo para configurar abra seu RME,crie uma nova área pequena onde o player ira começar.

AZUL são as POS dos baus,são tres coloque as 3

VERMELHO Nome dos pokemons que irão começar.

Após fazer isso vá no seu rme adicione nos baus a actiond ID:1740 após isso se você usa sqlite mude a posição de spawn no config.lua para o local que você criou,se usa mysql va na db do server aba players e muda a posição do spawn do Pokemon Trainer Sample.

FIz tudo como vc me falo,mas quando clico no bau da a msg "Você recebeu seu primeiro pokemon e um kit inicial...Boa Sorte em sua Jornada."

e abre ele mas n ganha nada e eu fico parado ali.

Link para o post
Compartilhar em outros sites

tenta esse altera a posição para a posição dos bau

local starterpokes = {

["Bulbasaur"] = {x = 53, y = 71, z = 7},

["Squirtle"] = {x = 50, y = 71, z = 7},

["Charmander"] = {x = 47, y = 71, z = 7},

}

local level = 5

local extrastr = 1.5

local btype = "normal"

function onUse(cid, item, frompos, item2, topos)

if getPlayerLevel(cid) > 1 then

return true

end

local pokemon = ""

for a, b in pairs (starterpokes) do

if isPosEqualPos(topos, b) then

pokemon = a

end

end

if pokemon == "" then return true end

local gender = getRandomGenderByName(pokemon)

local mypoke = getPokemonStatus(pokemon)

if not mypoke then return true end

local offense = mypoke.off * level * extrastr

local defense = mypoke.def * level * extrastr

local speed = mypoke.agi * level * extrastr

local vit = mypoke.vit * level * extrastr

local spatk = mypoke.spatk * level * extrastr

local happy = 180

local leveltable = getPokemonExperienceTable(pokemon)

doPlayerAddItem(cid, 2392, 20)

doPlayerAddItem(cid, 12345, 20)

doPlayerAddItem(cid, 12331, 1)

local item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", pokemon)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "level", level)

doItemSetAttribute(item, "exp", leveltable[level])

doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])

doItemSetAttribute(item, "offense", offense)

doItemSetAttribute(item, "defense", defense)

doItemSetAttribute(item, "speed", speed)

doItemSetAttribute(item, "vitality", vit)

doItemSetAttribute(item, "specialattack", spatk)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "gender", gender)

doItemSetAttribute(item, "description", "Contains a "..pokemon..".")

doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")

doItemSetAttribute(item, "firstpoke", getCreatureName(cid))

doPlayerAddItemEx(cid, item, true)

doTransformItem(item, pokeballs[btype].on)

doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")

doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

return TRUE

end

agora paro de da a msg e o bau nem abriu kk

Link para o post
Compartilhar em outros sites

@ Como eu percebi, você altera a script é não altera em nada?, Você esta mudando o script no lugar certo?, Você renicio ou deu reload no servidor?

Link para o post
Compartilhar em outros sites
  • Administrador

seu servidor tem level system?

TibiaKing Team- KingTópicos
www.tibiaking.com

Link para o post
Compartilhar em outros sites

tem sim,

function getPokemonStatus(name, multiplier)
local a = pokes[name]
local m = 1
if not a then return false end
if not a.offense then return false end
if multiplier then m = multiplier end
local ret = {}
ret.off = a.offense * m
ret.offense = ret.off
 
ret.def = a.defense * m
ret.defense = ret.def
 
ret.agi = a.agility * m
ret.agility = ret.agi
 
ret.spatk = a.specialattack * m
ret.specialattack = ret.spatk
 
ret.vit = a.vitality * m
ret.vitality = ret.vit
return ret
end
 
function getPokemonXMLOutfit(name)
local a = "data/monster/pokes/"..name..".xml"
local b = io.open(a, "a+")
local c = b:read("*all")
b:close()
local d, e = c:find('look type="(.-)"')
c = string.sub(c, d + 11, e - 1)
return tonumber©
end
 
function doEvolutionOutfit(cid, oldout, outfit)
if not isCreature(cid) then return true end
if getCreatureOutfit(cid).lookType == oldout then
doSetCreatureOutfit(cid, {lookType = outfit}, -1)
else
doSetCreatureOutfit(cid, {lookType = oldout}, -1)
end
end
 
function doStartEvolution(cid, evolution, seconds)
if not isCreature(cid) then return true end
local a = getPlayerStorageValue(cid, 1007)
local b = getCreatureHealth(cid) / getCreatureMaxHealth(cid)
local d = getThingPos(cid)
local e = getCreatureMaster(cid)
if getHappinessRate(cid) < 1 then return true end
local f = getCreatureOutfit(cid).lookType
local g = getItemAttribute(getPlayerSlotItem(e, 8).uid, "nick") or getCreatureName(cid)
local h = getPokemonXMLOutfit(evolution)
doItemSetAttribute(getPlayerSlotItem(e, 8).uid, "hp", b)
doCreatureSay(e, "What? My "..g.." is evolving!", TALKTYPE_SAY)
doSummonMonster(e, "Evolution")
doReturnPokemon(e, cid, getPlayerSlotItem(e, 8), 0, true)
local evo = getCreatureSummons(e)[1]
doEvolutionOutfit(evo, h, f)
doCreatureSetHideHealth(evo, true)
doCreatureSetLookDir(evo, 2)
setPlayerStorageValue(evo, 1007, g)
doTeleportThing(evo, d, false)
addEvent(sendSSJEffect, 250, evo)
doSendAnimatedText(getThingPos(evo), "EVOLUTION", COLOR_GRASS)
doSendEvolutionEffect(evo, getThingPos(evo), evolution, 20, false, false, f, h)
end
 
function doSendEvolutionEffect(cid, pos, evolution, turn, ssj, evolve, f, h)
if not isCreature(cid) then
doSendAnimatedText(pos, "CANCEL", 215)
return true end
if evolve then
doEvolvePokemon(getCreatureMaster(cid), {uid = cid}, evolution, 0, 0)
return true
end
doSendMagicEffect(pos, 18)
if ssj then
sendSSJEffect(evo)
end
doEvolutionOutfit(cid, f, h)
addEvent(doSendEvolutionEffect, math.pow(1900, turn/20), cid, getThingPos(cid), evolution, turn - 1, turn == 19, turn == 2, f, h)
end
 
function sendSSJEffect(cid)
if not isCreature(cid) then return true end
local pos1 = getThingPos(cid)
local pos2 = getThingPos(cid)
pos2.x = pos2.x + math.random(-1, 1)
pos2.y = pos2.y - math.random(1, 2)
doSendDistanceShoot(pos1, pos2, 37)
addEvent(sendSSJEffect, 45, cid)
end
 
function sendFinishEvolutionEffect(cid, alternate)
if not isCreature(cid) then return true end
local pos1 = getThingPos(cid)
 
if alternate then
local pos = {
[1] = {-2, 0},
[2] = {-1, -1},
[3] = {0, -2},
[4] = {1, -1},
[5] = {2, 0},
[6] = {1, 1},
[7] = {0, 2},
[8] = {-1, 1}}
for a = 1, 8 do
local pos2 = getThingPos(cid)
pos2.x = pos2.x + pos[a][1]
pos2.y = pos2.y + pos[a][2]
local pos = getThingPos(cid)
doSendDistanceShoot(pos2, pos, 37)
addEvent(doSendDistanceShoot, 300, pos, pos2, 37)
end
else
for a = 0, 3 do
doSendDistanceShoot(pos1, getPosByDir(pos1, a), 37)
end
for a = 4, 7 do
addEvent(doSendDistanceShoot, 600, pos1, getPosByDir(pos1, a), 37)
end
end
end
 
function doEvolvePokemon(cid, item2, theevo, stone1, stone2)
 
if not isCreature(cid) then return true end
 
if not pokes[theevo] or not pokes[theevo].offense then
doReturnPokemon(cid, item2.uid, getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect, false, true)
return true
end
 
local owner = getCreatureMaster(item2.uid)
local pokeball = getPlayerSlotItem(cid, 8)
local description = "Contains a "..theevo.."."
local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)
 
doItemSetAttribute(pokeball.uid, "hp", pct)
 
doItemSetAttribute(pokeball.uid, "poke", theevo)
doItemSetAttribute(pokeball.uid, "description", "Contains a "..theevo..".")
 
doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(item2.uid).." evolved into a "..theevo.."!")
 
doSendMagicEffect(getThingPos(item2.uid), 18)
doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[theevo])
doSendMagicEffect(getThingPos(cid), 173)
 
local oldpos = getThingPos(item2.uid)
local oldlod = getCreatureLookDir(item2.uid)
local oldlvl = getPokemonLevel(item2.uid)
doRemoveCreature(item2.uid)
 
doSummonMonster(cid, theevo)
local pk = getCreatureSummons(cid)[1]
 
doTeleportThing(pk, oldpos, false)
doCreatureSetLookDir(pk, oldlod)
 
sendFinishEvolutionEffect(pk, true)
addEvent(sendFinishEvolutionEffect, 550, pk, true)
addEvent(sendFinishEvolutionEffect, 1050, pk)
 
doPlayerRemoveItem(cid, stone1, 1)
doPlayerRemoveItem(cid, stone2, 1)
 
doAddPokemonInOwnList(cid, theevo)
 
local status = getPokemonStatus(getCreatureName(pk))
 
local off = status.off * 7.5
local def = status.def * 7.5
local agi = status.agi * 7.5
local spatk = status.spatk * 7.5
local vit = status.vit * 7
 
doItemSetAttribute(pokeball.uid, "offense", getItemAttribute(pokeball.uid, "offense") + off)
doItemSetAttribute(pokeball.uid, "defense", getItemAttribute(pokeball.uid, "defense") + def)
doItemSetAttribute(pokeball.uid, "speed", getItemAttribute(pokeball.uid, "speed") + agi)
doItemSetAttribute(pokeball.uid, "specialattack", getItemAttribute(pokeball.uid, "specialattack") + spatk)
doItemSetAttribute(pokeball.uid, "vitality", getItemAttribute(pokeball.uid, "vitality") + vit)
 
doPlayerSendTextMessage(cid, 27, "Evolution bonus: • Offense: +"..doMathDecimal(off).."  • Defense: +"..doMathDecimal(def).."  • Spc. Atk: +"..doMathDecimal(spatk).."  • Agility: +"..doMathDecimal(agi).."  • Vitality: +"..doMathDecimal(vit).."")
 
local happy = getItemAttribute(pokeball.uid, "happy")
 
doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)
 
if happy + happyGainedOnEvolution > 255 then
doItemSetAttribute(pokeball.uid, "happy", 255)
end
 
adjustStatus(pk, pokeball.uid, true, false)
 
if useKpdoDlls then
doUpdateMoves(cid)
end
end
 
 
 
 
 
function givePokemonExp(cid, item, expe, pct, rarecandy)
 
if expe <= 0 or not isCreature(cid) then return true end
 
local leveltable = getPokemonExperienceTable(getPokeballName(item.uid, true))
 
if getItemAttribute(item.uid, "exp") + expe > leveltable[100] then
givePokemonExp(cid, item, leveltable[100] - getItemAttribute(item.uid, "exp"))
return true
end
 
doItemSetAttribute(item.uid, "exp", getItemAttribute(item.uid, "exp") + expe)
doItemSetAttribute(item.uid, "happy", getItemAttribute(item.uid, "happy") + 1)
doItemSetAttribute(item.uid, "nextlevelexp", getItemAttribute(item.uid, "nextlevelexp") - expe)
 
 
if pct then
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." has received "..expe.." experience points ("..pct.."%).")
else
if getItemAttribute(item.uid, "nextlevelexp") > 0 then
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." ["..getItemAttribute(item.uid, "level").."] has received "..expe.." experience points ("..getItemAttribute(item.uid, "nextlevelexp").." to next level).")
else
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." ["..getItemAttribute(item.uid, "level").."] has received "..expe.." experience points and has leveled up!")
end
end
 
if isBeingUsed(item.itemid) then
doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), expe, 215)
end
 
if getItemAttribute(item.uid, "nextlevelexp") <= 0 then
local summon = getCreatureSummons(cid)[1]
 
if not isCreature(summon) then return true end
 
doSendFlareEffect(getThingPos(summon))
doSendAnimatedText(getThingPos(summon), "Level up!", 215)
 
adjustPokemonLevel(item.uid, cid, item.itemid)
end
end
 
 
function givePokemonExpInBp(cid, item, expe, ballid, pct, hidemessage)
 
if expe <= 0 or not isCreature(cid) then return true end
 
local leveltable = getPokemonExperienceTable(getPokeballName(item, true))
 
if getItemAttribute(item, "exp") + expe > leveltable[100] then
givePokemonExpInBp(cid, item, leveltable[100] - getItemAttribute(item, "exp"), ballid)
return true
end
 
doItemSetAttribute(item, "exp", getItemAttribute(item, "exp") + expe)
doItemSetAttribute(item, "happy", getItemAttribute(item, "happy") + 1)
doItemSetAttribute(item, "nextlevelexp", getItemAttribute(item, "nextlevelexp") - expe)
 
if not hidemessage then
if pct then
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." has received "..expe.." experience points ("..pct.."%).")
else
if getItemAttribute(item, "nextlevelexp") > 0 then
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." ["..getItemAttribute(item, "level").."] has received "..expe.." experience points inside his pokeball ("..getItemAttribute(item, "nextlevelexp").." to next level).")
else
doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." ["..getItemAttribute(item, "level").."] has received "..expe.." experience points and has leveled up inside his pokeball.")
adjustPokemonLevel(item, cid, ballid)
end
end
end
end
 
 
 
function doMathDecimal(number, casas)
 
if math.floor(number) == number then return number end
 
local c = casas and casas + 1 or 3
 
for a = 0, 10 do
if math.floor(number) < math.pow(10, a) then
local str = string.sub(""..number.."", 1, a + c)
return tonumber(str)
end
end
 
return number
end
 
 
 
function adjustPokemonLevel(item, cid, id, rarecandy)
 
if not isCreature(cid) then return true end
 
local exp = getItemAttribute(item, "exp")
local level = getItemAttribute(item, "level")
local leveltable = getPokemonExperienceTable(getPokeballName(item, true))
local newlevel = 1
 
for x = 1, 100 do
if exp >= leveltable[x] and exp < leveltable[x+1] then
newlevel = x
end
end
 
if newlevel <= 1 then return true end
 
local levelsup = (newlevel - level)
local pokemon = getItemAttribute(item, "poke")
local happy = getItemAttribute(item, "happy")
local rate = happy / 100
local newhappiness = happy
 
if happy >= 250 then
newhappiness = 255
elseif happy >= 230 then
newhappiness = happy + 4
elseif happy >= 210 then
newhappiness = happy + 6
elseif happy >= 180 then
newhappiness = happy + 8
elseif happy >= 140 then
newhappiness = happy + 10
elseif happy >= 110 then
newhappiness = happy + 12
else
newhappiness = happy + 15
end
 
local status = getPokemonStatus(pokemon)
 
local off = status.off * rate * levelsup
local def = status.def * rate * levelsup
local agi = status.agi * rate * levelsup
local spatk = status.spatk * rate * levelsup
local vit = status.vit * rate * levelsup
 
doItemSetAttribute(item, "level", newlevel)
 
if not rarecandy then
doItemSetAttribute(item, "happy", newhappiness)
end
 
local nextexp = leveltable[newlevel + 1] - exp
doItemSetAttribute(item, "nextlevelexp", nextexp)
 
doItemSetAttribute(item, "offense", getItemAttribute(item, "offense") + off)
doItemSetAttribute(item, "defense", getItemAttribute(item, "defense") + def)
doItemSetAttribute(item, "speed", getItemAttribute(item, "speed") + agi)
doItemSetAttribute(item, "specialattack", getItemAttribute(item, "specialattack") + spatk)
doItemSetAttribute(item, "vitality", getItemAttribute(item, "vitality") + vit)
 
if newlevel > getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer then
addEvent(doPlayerSendTextMessage, 30, cid, 18, "Warning: Your "..getPokeballName(item).."'s ["..newlevel.."] level is much higher than yours, so you will not be able to call him to battles.")
end
 
if isCreature(cid) and id >= 1 and isBeingUsed(id) then
adjustStatus(getCreatureSummons(cid)[1], item, false, true)
doPlayerSendTextMessage(cid, 27, "• Level: "..newlevel.." (+"..levelsup..")  • Offense: +"..doMathDecimal(off).."  • Defense: +"..doMathDecimal(def).."  • Spc. Atk: +"..doMathDecimal(spatk).."  • Agility: +"..doMathDecimal(agi).."  • Vitality: +"..doMathDecimal(vit).."")
 
if happy < minHappyToEvolve then return true end
 
if pokemonsCanEvolveByLevel then
 
local summon = getCreatureSummons(cid)[1]
 
local reqlevel = poevo[getCreatureName(summon)] and poevo[getCreatureName(summon)].level or -1
local level = getItemAttribute(item, "level")
local evolution = "none"
local name = getCreatureName(summon)
 
if name == "Tyrogue" and level >= 20 then
if getOffense(summon) == getDefense(summon) then
evolution = "Hitmontop"
elseif getOffense(summon) > getDefense(summon) then
evolution = "Hitmonlee"
else
evolution = "Hitmonchan"
end
elseif name == "Eevee" then
if happy >= maxHappyToEvolve then
if isDay() then
evolution = "Espeon"
else
evolution = "Umbreon"
end
end
elseif name == "Slowpoke" and level >= 28 then
evolution = "Slowbro"
elseif name == "Poliwhirl" and level >= 36 then
evolution = "Poliwrath"
elseif reqlevel > 4 and level >= reqlevel then
evolution = poevo[getCreatureName(summon)].evolution
elseif reqlevel == 2 and happy >= maxHappyToEvolve then
evolution = poevo[getCreatureName(summon)] and poevo[getCreatureName(summon)].evolution or "none"
end
 
if evolution ~= "none" then
doStartEvolution(summon, evolution, 4)
end
end
end
end
 
function adjustStatus(pk, item, health, vite, conditions)
 
if not isCreature(pk) then return true end
 
local bonusoffense = getItemAttribute(item, boffense) or 0
local bonusdefense = getItemAttribute(item, bdefense) or 0
local bonusagility = getItemAttribute(item, bagility) or 0
local bonussattack = getItemAttribute(item, bsattack) or 0
 
setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level"))
setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense") + bonusoffense)
setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense") + bonusdefense)
setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed") + bonusagility)
setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack") + bonussattack)
 
local gender = getItemAttribute(item, "gender") and getItemAttribute(item, "gender") or 0
doCreatureSetSkullType(pk, gender)
 
if vite == true then
local pct = getCreatureHealth(pk) / getCreatureMaxHealth(pk)
local vit = getItemAttribute(item, "vitality") - getPlayerStorageValue(pk, 1004)
setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + ( vit * HPperVIT ))
doCreatureAddHealth(pk, pct * vit * HPperVIT)
end
 
setPlayerStorageValue(pk, 1004, getItemAttribute(item, "vitality"))
 
doRegainSpeed(pk)
 
local nick = getItemAttribute(item, "poke")
 
if getItemAttribute(item, "nick") then
nick = getItemAttribute(item, "nick")
end
 
setPlayerStorageValue(pk, 1007, nick)
 
local boostlevel = getItemAttribute(item, "boost") or 0
local boostshow = hideBoost and "]" or " + "..boostlevel.."]"
local lvlstr = ""
 
if showBoostSeparated then
boostshow = hideBoost and "]" or "] [+"..boostlevel.."]"
end
 
if hideSummonsLevel then
if not hideBoost then
nick = nick.." [+"..boostlevel.."]"
end
else
nick = nick.." ["..getItemAttribute(item, "level")..""..boostshow..""
end
 
doCreatureSetNick(pk, nick)
 
if not getItemAttribute(item, "happy") then
doItemSetAttribute(item, "happy", 120)
end
 
if not getItemAttribute(item, "hunger") then
doItemSetAttribute(item, "hunger", 5)
end
 
local happy = getItemAttribute(item, "happy")
if happy < 0 then
happy = 0
end
setPlayerStorageValue(pk, 1008, happy)
 
local hunger = getItemAttribute(item, "hunger")
setPlayerStorageValue(pk, 1009, hunger)
 
if health == true then
local mh = getCreatureMaxHealth(pk) + HPperVIT * getVitality(pk)
local rd = 1 - (tonumber(getItemAttribute(item, "hp")))
setCreatureMaxHealth(pk, mh)
doCreatureAddHealth(pk, getCreatureMaxHealth(pk))
doCreatureAddHealth(pk, -(getCreatureMaxHealth(pk) * rd))
end
 
if isSummon(pk) and conditions then
local burn = getItemAttribute(item, "burn")
if burn and burn >= 0 then
addEvent(doAdvancedBurn, 5000, pk, pk, getItemAttribute(item, "burndmg"), burn - 1)
end
 
local poison = getItemAttribute(item, "poison")
if poison and poison >= 0 then
addEvent(doAdvancedPoison, 2500, pk, pk, getItemAttribute(item, "poisondmg"), poison - 1)
end
 
if getItemAttribute(item, "confuse") and getItemAttribute(item, "confuse") >= 1 then
addEvent(doAdvancedConfuse, 1200, pk, getItemAttribute(item, "confuse"), getPlayerStorageValue(pk, 3891))
end
 
if getItemAttribute(item, "blind") and getItemAttribute(item, "blind") >= 1 then
addEvent(doBlind, 300, pk, getItemAttribute(item, "blind"), getItemAttribute(item, "blindef"))
end
 
if getItemAttribute(item, "sleep") and getItemAttribute(item, "sleep") >= 1 then
doSleep(pk, getItemAttribute(item, "sleep"))
end
end
 
return true
end
 
function setWildPokemonLevel(cid, optionalLevel, optionalStatus, optionalNick, optionalExtraExp)
 
if not isCreature(cid) then return true end
if not pokes[getCreatureName(cid)] then return true end  --alterado v2.6
 
local levelRange = 0
local off = 0
local def = 0
local agi = 0
local spatk = 0
local vit = 0
local this = getCreatureName(cid)
local ee = 1
 
if optionalExtraExp then
ee = optionalExtraExp
end
 
 
if optionalLevel and tonumber(optionalLevel) >= 1 then
if optionalLevel <= 100 then
levelRange = optionalLevel
else
levelRange = 100
end
elseif getCreatureOutfit(cid).lookHead and getCreatureOutfit(cid).lookBody and getCreatureOutfit(cid).lookHead <= getCreatureOutfit(cid).lookBody then
levelRange = math.random(getCreatureOutfit(cid).lookHead, getCreatureOutfit(cid).lookBody)
else
levelRange = math.random(20, 30)
end
 
local status = getPokemonStatus(this)
if status then
off = status.off
def = status.def
agi = status.agi
vit = status.vit
spatk = status.spatk
end
 
setPlayerStorageValue(cid, 1000, levelRange)
 
if optionalStatus and optionalStatus.off then
setPlayerStorageValue(cid, 1001, optionalStatus.offense)
setPlayerStorageValue(cid, 1002, optionalStatus.defense)
setPlayerStorageValue(cid, 1003, optionalStatus.agility)
setPlayerStorageValue(cid, 1004, optionalStatus.vitality)
setPlayerStorageValue(cid, 1005, optionalStatus.specialattack)
setPlayerStorageValue(cid, 1011, optionalStatus.offense)
setPlayerStorageValue(cid, 1012, optionalStatus.defense)
setPlayerStorageValue(cid, 1013, optionalStatus.agility)
setPlayerStorageValue(cid, 1014, optionalStatus.vitality)
setPlayerStorageValue(cid, 1015, optionalStatus.specialattack)
else
setPlayerStorageValue(cid, 1001, 5 + math.random(off * levelRange * 0.9, off * levelRange * 1.8))
setPlayerStorageValue(cid, 1002, 5 + math.random(def * levelRange * 0.9, def * levelRange * 1.8))
setPlayerStorageValue(cid, 1003, math.random(agi * levelRange * 0.9, agi * levelRange * 1.8))
setPlayerStorageValue(cid, 1004, math.random(vit * levelRange * 0.9, vit * levelRange * 1.8))
setPlayerStorageValue(cid, 1005, 5 + math.random(spatk * levelRange * 0.9, spatk * levelRange * 1.8))
setPlayerStorageValue(cid, 1011, getPlayerStorageValue(cid, 1001))
setPlayerStorageValue(cid, 1012, getPlayerStorageValue(cid, 1002))
setPlayerStorageValue(cid, 1013, getPlayerStorageValue(cid, 1003))
setPlayerStorageValue(cid, 1014, getPlayerStorageValue(cid, 1004))
setPlayerStorageValue(cid, 1015, getPlayerStorageValue(cid, 1005))
end
 
doRegainSpeed(cid)
 
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + getPlayerStorageValue(cid, 1004) * HPperVIT * vitReductionForWild)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    
if pokes[getCreatureName(cid)].exp then
--getMonsterInfo(getCreatureName(cid)).experience
local exp = (50 + pokes[getCreatureName(cid)].exp) * baseExpRate + pokes[getCreatureName(cid)].vitality * levelRange * pokemonExpPerLevelRate
setPlayerStorageValue(cid, 1006, exp * generalExpRate * ee)
if getPlayerStorageValue(cid, 22546) == 1 then
          setPlayerStorageValue(cid, 1006, 750)
          doSetCreatureDropLoot(cid, false)         --edited golden arena
       end  
end
 
local wildshow = wildBeforeNames and "Wild " or ""
if optionalNick then
if hideWildsLevel then
doCreatureSetNick(cid, optionalNick)
else
doCreatureSetNick(cid, optionalNick.." ["..getWildPokemonLevel(cid).."]")
end
else
if hideWildsLevel then
doCreatureSetNick(cid, ""..wildshow..""..getCreatureName(cid).."")
else
doCreatureSetNick(cid, ""..wildshow..""..getCreatureName(cid).." ["..getWildPokemonLevel(cid).."]")
end
end
end
 
function getOffense(cid)
if not isCreature(cid) then return 0 end
 
if getPlayerStorageValue(cid, 3894) >= 1 then
return tonumber(getPlayerStorageValue(cid, 1001)) / 2
end
 
return tonumber(getPlayerStorageValue(cid, 1001))
end
 
function getDefense(cid)
if not isCreature(cid) then return 0 end
 
if getPlayerStorageValue(cid, 3894) >= 1 then
return tonumber(getPlayerStorageValue(cid, 1002)) / 2
end
 
return tonumber(getPlayerStorageValue(cid, 1002))
end
 
function getSpeed(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1003))
end
 
function getVitality(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1004))
end
 
function getSpecialAttack(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1005))
end
 
function getHappiness(cid)
if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1008))
end
 
function getSpecialDefense(cid)
if not isCreature(cid) then return 0 end
return getSpecialAttack(cid) * 0.85 + getDefense(cid) * 0.2
end
 
function getWildPokemonExp(cid)
return getPlayerStorageValue(cid, 1006)
end
 
function getWildPokemonLevel(cid)
return getPlayerStorageValue(cid, 1000)
end
 
function getLevel(cid)
if isSummon(cid) then
return getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "level")
end
return getPlayerStorageValue(cid, 1000)
end
 
function getPokeName(cid)
if not isSummon(cid) then return getCreatureName(cid) end
if getCreatureName(cid) == "Evolution" then return getPlayerStorageValue(cid, 1007) end
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
if getItemAttribute(item.uid, "nick") then
return getItemAttribute(item.uid, "nick")
end
return getCreatureName(cid)
end
 
function getPokeballName(item, truename)
if not truename and getItemAttribute(item, "nick") then
return getItemAttribute(item, "nick")
end
return getItemAttribute(item, "poke")
end
 
function getPokemonName(cid)
return getCreatureName(cid)
end
 
function getPokemonLevel(cid)
if not isCreature(cid) then return 0 end
return getPlayerStorageValue(cid, 1000)
end
 
function getPokemonGender(cid)
return getCreatureSkullType(cid)
end


@ Como eu percebi, você altera a script é não altera em nada?, Você esta mudando o script no lugar certo?, Você renicio ou deu reload no servidor?

Uma vez que eu mudei a frase de receber o pokemon apareceu mas so a frase eu nao ganhei nada,estou sim mudando o script no lugar certo e dando reload

 

 

seu servidor tem level system?

 

Agora conseguir arrumar,eu procurei qual script ele ta usando ai alterei nele ,Vlw ai ^^

 

So pra pegar um gancho ak eu to querendo saber onde eu mudo o status que o poke ganha ao ser bostado,por exemplo ta ganhando 340 de offense eu quero diminuir onde eu mudo?

Editado por vitorcru (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo