DevilMoon 125 Postado Julho 31, 2010 Share Postado Julho 31, 2010 (editado) Ola Eks , Estava Admistrando meu Otserv , quando Tive uma Fantastica Ideia , Porque nao Ter uma Talkaction que Adicione Reset? que nem add skill , level club? entaum tentei criar nao , consigui, pedi ajuda ao vodkart meu Professor e Ele Foi me Ajudando e Saiu Nisso!! EXplicando a Talkaction Funcionara assim!!! /addreset DevilMoon,1 , Eu Estava com 10 Resets , Fiquei passar com 11!! Entao Fizemos , 2 Scripts , um para quem Tem sistema de Reset com Talkaction Ex: !reset e Um para quem Tem Npc!! , Porque muinta gente Tem Duvidas em Trocar o Storage!! Começando com o do Npc!! Vá em Data>Talkactions>Scripts Crie uma pasta.lua chamada addreset e coloque isso!! -- [[ Script by Devilmoon e Vodkart for XTibia.com ]] -- function onSay(cid, words, param) local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local s = 36874 local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) local storageplayer = getPlayerStorageValue(player, s) local time = storageplayer+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Were added "..quanty.." reset your character.") setPlayerStorageValue(player, s, time) return TRUE end Agora em Data>Talkactions.xml Adicione a Seguinte Tag!! <talkaction words="/addreset" event="script" value="addreset.lua"/> <talkaction words="!getresets" value="getresets.lua"/> Agora para quem tem Sistema de Reset como Talkaction que é !reset Vamos la!! Data>Talkactions>Scripts crie uma pasta.xml e coloque isso!! -- [[ Script by Devilmoon e Vodkart for XTibia.com ]] -- function onSay(cid, words, param) local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local s = 1020 local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) local storageplayer = getPlayerStorageValue(player, s) local time = storageplayer+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Were added "..quanty.." reset your character.") setPlayerStorageValue(player, s, time) return TRUE end Agora em Data>Talkactions.xml Adicione a Tag! <talkaction words="/addreset" event="script" value="addreset.lua"/> <talkaction words="!getresets" value="getresets.lua"/> Aos que Tem Reset em Npc!! Data>Talkactions>Scripts crie uma pasta.lua e renomeie para getresets e coloque isso! function onSay(cid, words, param) function getResets(cid) resets = getPlayerStorageValue(cid,36874) if resets < 0 then resets = 0 end return resets end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (getResets(cid)) .." reset's No seu Char!") return TRUE end Agora para os que tem reset de talkaction !reset vá em Data>Talkactions>Scripts crie uma pasta.lua chamada getresets e coloque isso! function onSay(cid, words, param) function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (getResets(cid)) .." reset's No seu Char!") return TRUE end Fim! Agora Voce deve Estar se Perguntando , Aff vo te que adiciona o access="5" na tag , pq se nao os player vao usar!! e oque Significa aquele getresets? Nada disso o Script ja vem com o comando! if getPlayerAccess(cid) == 5 then e o getsreset, mostra quantos reset seu char tem!! Espero que Gostem do Script , e Usem Com Carinho!!! Abraços Editado Agosto 14, 2010 por DevilMoon Link para o comentário Compartilhar em outros sites More sharing options...
brunohenriquevelasques96 0 Postado Agosto 3, 2010 Share Postado Agosto 3, 2010 Cara fico muito bom! eu ja coloquei no meu OTserve Para ver reset ja tinha pra vender skills agr da pra vender resets. Attr: The Dragon Link para o comentário Compartilhar em outros sites More sharing options...
Doidin 275 Postado Agosto 3, 2010 Share Postado Agosto 3, 2010 (editado) Velho os dois scripts são os mesmos, só muda a storage... LOL?! Cara só corrigindo um errozinho script: -- [[ Script by Devilmoon e Vodkart for XTibia.com ]] -- function onSay(cid, words, param) local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local s = 1020 local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) local storageplayer = getPlayerStorageValue(player, s) local time = storageplayer+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Were added "..quanty.." reset your character.") setPlayerStorageValue(player, s, time) return TRUE end Quem quiser mudar o script para o sistema de Vip por NPC, é só mudar o storage no "local s"... =s Abraços... Editado Agosto 3, 2010 por Doidin Link para o comentário Compartilhar em outros sites More sharing options...
DevilMoon 125 Postado Agosto 14, 2010 Autor Share Postado Agosto 14, 2010 sim é q tem muinta gente com dificuldade!! para mudar a storage por isso! Link para o comentário Compartilhar em outros sites More sharing options...
Limoones 0 Postado Maio 18, 2011 Share Postado Maio 18, 2011 É no meu caso que uso o Advanced~~ 2.0 sem storage como que eu faço ??? Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados