nyuchiha 108 Postado Maio 16, 2010 Share Postado Maio 16, 2010 (editado) Eai Pessoal Pedidos espero que um pouco simples =) Gostaria de um script de reset + vocation baseado nesse aki function onSay(cid, words, param) local level = 60 local RemainingLvl = 8 local pid = getPlayerGUID(cid) voc = getPlayerVocation(cid) mana = 35 health = 185 function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerAddItem(cid,item,1) if RemainingLvl and voc == 5 then doPlayerSetVocation(cid, 9) elseif RemainingLvl and voc == 6 then doPlayerSetVocation(cid, 10) elseif RemainingLvl and voc == 7 then doPlayerSetVocation(cid, 11) elseif RemainingLvl and voc == 8 then doPlayerSetVocation(cid, 12) setCreatureMaxMana(cid, mana) setCreatureMaxHealth(cid, health) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end return TRUE end Ele esta estranho ,ali em local level = 60 ( seria o lvl para resetar ) mesmo o player sendo 60 ow mais ele fala que precisa ser lvl 60 =_= Mais pode ser qualquer reset+ vocation so que eu queria q tivese essa parte: if RemainingLvl and voc == 5 thendoPlayerSetVocation(cid, 9) elseif RemainingLvl and voc == 6 then doPlayerSetVocation(cid, 10) elseif RemainingLvl and voc == 7 then doPlayerSetVocation(cid, 11) elseif RemainingLvl and voc == 8 then doPlayerSetVocation(cid, 12) Ficaria mais facil de colocar de que vocação pra qual vocação.. E Uma função de que quando o player upa solta uma mas san envolta ( efeitos especiais xD ) Se alguel tiver um mais dahora que o mas san serve =) Vlw Editado Maio 26, 2010 por DeathAngels Link para o comentário https://xtibia.com/forum/topic/132937-fechado/ Compartilhar em outros sites More sharing options...
matheus1000 11 Postado Maio 19, 2010 Share Postado Maio 19, 2010 DeathAngels, o tópico está no lugar errado, era pra estar na seção de dúvidas. Alguem moderador mova esse tópico para o lugar correto. olha eu dando uma de mod Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-876705 Compartilhar em outros sites More sharing options...
guedes101 6 Postado Maio 19, 2010 Share Postado Maio 19, 2010 acho que o dos efeitos eu tenho aqui.. vá em data\creaturescripts\scripts crie um arquivo.lua e renomeie para advance.lua dentro coloque: local config = { [0] = { "Fist skill UP", 30}, -- 30 = variable[2] -- Animation effect [1] = { "Club skill UP", 30}, -- 30 = variable[2] -- Animation effect [2] = { "Sword skill UP", 30}, -- 30 = variable[2] -- Animation effect [3] = { "Axe skill UP", 30}, -- 30 = variable[2] -- Animation effect [4] = { "Distance skill UP", 30}, -- 30 = variable[2] -- Animation effect [5] = { "Shield skill UP", 30}, -- 30 = variable[2] -- Animation effect [6] = { "Fishing skill UP", 30}, -- 30 = variable[2] -- Animation effect [7] = { "Magic level UP", 30}, -- 30 = variable[2] -- Animation effect [8] = { "Level UP", 30} -- 30 = variable[2] -- Animation effect } function onAdvance(cid, skill, oldlevel, newlevel) local pos = getPlayerPosition(cid) local effectPositions = { } for type, variable in pairs(config) do if skill == type then doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1) for _, ePos in ipairs(effectPositions) do doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY) doSendMagicEffect(ePos, CONST_ME_HOLYAREA) end end end return TRUE end em login.lua adicione a linha: registerCreatureEvent(cid, "advance") em Creaturescript.xml adicione a tag: <event type="advance" name="advance" script="advance.lua"/> Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-876742 Compartilhar em outros sites More sharing options...
nyuchiha 108 Postado Maio 19, 2010 Autor Share Postado Maio 19, 2010 Mais porque seção de duvidas ??? se eu estou pedindo o script??? Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-876759 Compartilhar em outros sites More sharing options...
guedes101 6 Postado Maio 19, 2010 Share Postado Maio 19, 2010 MasterMathw foi infeliz no seu comentario... ele ainda é novo nessa area,e supostamente não leu seu o topico todo. Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-876800 Compartilhar em outros sites More sharing options...
nyuchiha 108 Postado Maio 24, 2010 Autor Share Postado Maio 24, 2010 Olha o script n esta certinho Quando eu upo aparece em laranja em cima [ up .... etc ] mais n faz o mas san em volta do player vlw Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-879467 Compartilhar em outros sites More sharing options...
Henrique Moura 193 Postado Maio 30, 2010 Share Postado Maio 30, 2010 fechado à pedido do dono. Link para o comentário https://xtibia.com/forum/topic/132937-fechado/#findComment-882870 Compartilhar em outros sites More sharing options...
Posts Recomendados