Postado Maio 14, 2017 8 anos O script abaixo evolui a wand/rod do player conforme ele upa de level. Gostaria que me ajudassem a fazer o mesmo procedimento só que para paladins. local items = { {13,2191,2186,-1}, {19,2188,2185,0}, {22,8921,8911,1}, {26,2189,2181,2}, {33,2187,2183,3}, {37,8920,8912,4}, {45,8922,8910,5}, {99999999999} } local stuff = {2190,2182,2191,2188,8921,2189,2187,8920,8922,2186,2185,8911,2181,2183,8912,8910} function onAdvance(cid, skill, oldlevel, newlevel) local place = 0 local st = 23636 local blala = newLevel if isInArray({1,2,5,6},getPlayerVocation(cid)) then if skill == 8 then for x = 1, #items do if newlevel >= items[x][1] and newlevel < items[x+1][1] then place = x end end if place > 0 then if getPlayerStorageValue(cid,st) <= items[place][4] then local byvoc = getPlayerVocation(cid) if getPlayerVocation(cid) > 4 then byvoc = getPlayerVocation(cid)-4 end if isInArray(stuff,getPlayerSlotItem(cid,5).itemid) then doRemoveItem(getPlayerSlotItem(cid,5).uid) elseif isInArray(stuff,getPlayerSlotItem(cid,6).itemid) then doRemoveItem(getPlayerSlotItem(cid,6).uid) end doPlayerAddItem(cid,items[place][byvoc+1],1) doPlayerSendTextMessage(cid,4,"While upar his wand also evolved: "..getItemNameById(items[place][byvoc+1])..".") setPlayerStorageValue(cid,st,items[place][4]+1) end end end end return TRUE end Paladin (3), Royal Paladin (7) Item Inicial - Spear Level 20 - Hunting Spear Level 25 - Royal Spear Level 42 - Enchanted Spear Level 80 - Assassin Star Spear - ID:2389 | Hunting - ID:3965 | Royal - ID:7378 | Enchanted - ID:7367 | Assassin - ID:7368 Como as munições serão infinitas ao evoluir deve receber o item em 1x e não em 100x Se alguém puder ajudar eu agradeço.. Vlw :D Editado Maio 14, 2017 8 anos por DiegoRulez (veja o histórico de edições)
Postado Maio 17, 2017 8 anos Autor Alguém pode ajudar? @xWhiteWolf Editado Maio 17, 2017 8 anos por DiegoRulez (veja o histórico de edições)
Postado Maio 20, 2017 8 anos local items = { {13,2389,-1}, {19,3965,0}, {22,7378,1}, {26,7367,2}, {33,7368,3}, {99999999999} } local stuff = {2389,3965,7378,7367,7368} function onAdvance(cid, skill, oldlevel, newlevel) local place = 0 local st = 23636 local blala = newLevel if isInArray({3,7},getPlayerVocation(cid)) then if skill == 8 then for x = 1, #items do if newlevel >= items[x][1] and newlevel < items[x+1][1] then place = x end end if place > 0 then if getPlayerStorageValue(cid,st) <= items[place][4] then local byvoc = getPlayerVocation(cid) if getPlayerVocation(cid) > 4 then byvoc = getPlayerVocation(cid)-4 end if isInArray(stuff,getPlayerSlotItem(cid,3).itemid) then doRemoveItem(getPlayerSlotItem(cid,3).uid) elseif isInArray(stuff,getPlayerSlotItem(cid,7).itemid) then doRemoveItem(getPlayerSlotItem(cid,7).uid) end doPlayerAddItem(cid,items[place][byvoc+1],1) doPlayerSendTextMessage(cid,4,"While upar his wand also evolved: "..getItemNameById(items[place][byvoc+1])..".") setPlayerStorageValue(cid,st,items[place][4]+1) end end end end return TRUE end Obs.: alterei os "local Itens" e o "stuff" porém o lvl mantive o mesmo (13,19,22,26,33), se quiser alterar os leveis eh so mudar os valores. Editado Maio 20, 2017 8 anos por Italo Zeferino (veja o histórico de edições)
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.