jonathanmg 0 Postado Julho 2, 2009 Share Postado Julho 2, 2009 GOSTARIA DE IMPLANTAR O !rank de lvl (ja tem no server soh que eu queria q atualizasse de 30 em 30 min se possivel eh claro) e tbm queria fazer um !rank1 q no caso ele contaria os RESETS do personagem =D se alguem tem duvidas sobre o reset olha o topico com a script RESET LINK Obrigado e Ateh logo Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/ Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 2, 2009 Share Postado Julho 2, 2009 (editado) cara o !ranks ele verifica no ato de falar isso ele nao atualiza os ranks ele sempre mostra os ranks na hora que e falado !ranks. e so add isso no script do !ranks: function getResets(cid)resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end e por a fala que ira dizer ao player os resets. "you now was reset, you have "..getResets(cid).." reset." lembrando que voce vai ter que adicionar essa linha do comentario dos resets dentro disso: doPlayerPopupFYI(cid, aonde tiver isso voce poe a linha junto cuidado pra nao errar. lembrando eu mudei o storage value poe o mesmo do npc. Editado Julho 2, 2009 por Marcryzius Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-755903 Compartilhar em outros sites More sharing options...
jonathanmg 0 Postado Julho 2, 2009 Autor Share Postado Julho 2, 2009 (editado) vixee kposapskpoaSOPK meu deus nao entendi mto vo tenta faze aki mais fala onde poe q pasta e qual arquivo por favor ? ae depois ja da ateh pra monta um tuto aki pra algum interessado =D Creditos a vc xP =====Edited====== nao consigui nao =/ nao sei onde ponho nada ali pra fala real =/ sorry Editado Julho 2, 2009 por Shiryuuu Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-755929 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 2, 2009 Share Postado Julho 2, 2009 posta ae o script do ranks que voce ta usando pra eu editar e postar pra voce arrumado. Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-756144 Compartilhar em outros sites More sharing options...
jonathanmg 0 Postado Julho 2, 2009 Autor Share Postado Julho 2, 2009 Ae jow o scripter O LUA -- SCRIPT FEITO POR YUNIE-- config minlevel = 800 -- level para resetar price = 10000 newlevel = 8 -- level após reset newexp = 4200 -- nova experiencia após reset -- end config function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,36874,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,36874) if resets < 0 then resets = 0 end return resets end local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'reset') then selfSay('Do you want to reset your character level? Your character will be logged off if you confirm. You must pay '..price..' gold coins to reset.', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < price then selfSay('You must pay '..price..' gold coins to reset.', cid) elseif getPlayerLevel(cid) < minlevel then selfSay('You must be at least level '.. minlevel ..' to reset.', cid) else doPlayerRemoveMoney(cid,price) addReset(cid) playerid = getPlayerGUID(cid) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."") end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok.', cid) elseif msgcontains(msg, 'quant') then selfSay('You have '..getResets(cid)..' reset(s).', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) e o XML <?xml version="1.0"?><npc name="Reseter" script="data/npc/scripts/reseter.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="133" head="10" body="122" legs="19" feet="10"/> <parameters> <parameter key="message_greet" value="Hello, |PLAYERNAME|. I can 'reset' your level. If you want to see how many resets you have, say 'quant'."/> </parameters> </npc> Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-756321 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 2, 2009 Share Postado Julho 2, 2009 Ae jow o scripter O LUA e o XML eu falei ranks nao npc. Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-756323 Compartilhar em outros sites More sharing options...
jonathanmg 0 Postado Julho 2, 2009 Autor Share Postado Julho 2, 2009 LoL Viagei kkkkkkkkkkkk local ranks = { ['fist'] = {0}, ['club'] = {1}, ['sword'] = {2}, ['axe'] = {3}, ['distance'] = {4}, ['shield'] = {5}, ['fish'] = {6}, ['magic'] = {7}, ['level'] = {8}, } function onSay(cid, words, param) local msg = string.lower(param) if ranks[msg] ~= nil then str = getHighscoreString((ranks[msg][1])) else str = getHighscoreString((8)) end doShowTextDialog(cid,6500, str) return TRUE end Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-756354 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 3, 2009 Share Postado Julho 3, 2009 vo ve o que eu posso fazer nao tenho certreza se irei arrumar. Link para o comentário https://xtibia.com/forum/topic/115416-action-1-script/#findComment-756662 Compartilhar em outros sites More sharing options...
Posts Recomendados