romeu23 0 Postado Julho 25, 2012 Share Postado Julho 25, 2012 Presciso de um script que seja um comando para adicionar storage em todos os players da guild Ex: !guild1 NOMEDAGUILD e de resetar a guild que tiver na guild1 , Ex: !guild1off ][/font]function onSay(cid, words, param, channel) if words == '!guild1' then if (getGuildId(param)) then doPlayerSendTextMessage(cid,4,"A Guild "..param.." foi adicionada com sucesso!") setGlobalStorageValue(13540,getGuildId(param)) else doPlayerSendTextMessage(cid,4,"Nome inválido.") end elseif words == '!guild2' then if (getGuildId(param)) then doPlayerSendTextMessage(cid,4,"A Guild "..param.." foi adicionada com sucesso.") setGlobalStorageValue(guild_2,getGuildId(param)) else doPlayerSendTextMessage(cid,4,"Nome inválido.") end elseif words == '!guildoff' then setGlobalStorageValue(guild_1,0) setGlobalStorageValue(guild_2,0) doPlayerSendTextMessage(cid,4,"Slots resetados.") end return true end Estou usando essa e nao esta dando certo ! Alguem? presciso urgente!! ALGUEM ME AJUDA AI ? VALENDO REP+ PLIX!! Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/ Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 function onSay(cid, words, param, channel) param = string.lower(param) storages = {99555,99556} if isInArray({'!guild1','!guild2'}, words) then if param == '' or not getGuildId(param) then doPlayerSendTextMessage(cid,4,"está guild não existe!") return true end doPlayerSendTextMessage(cid,4,"A Guild ["..param.."] foi adicionada com sucesso no slot "..(words == '!guild1' and "1" or "2")) setGlobalStorageValue(words == '!guild1' and storages[1] or storages[2],getGuildId(param)) elseif words == '!guildoff' then setGlobalStorageValue(storages[1],0) setGlobalStorageValue(storages[2],0) doPlayerSendTextMessage(cid,4,"Slots resetados.") end return true end Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300658 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 nao quer dar vodkart ;s Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300668 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 não quer dar oq? algum erro? colocou a tag certinho? <talkaction words="!guild1;!guild2;!guildoff" event="script" value="nome do seu script.lua"/> Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300676 Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 25, 2012 Share Postado Julho 25, 2012 tenta isso. function onSay(cid, words, param, channel) if words == '!guild1' then if (getGuildId(param)) then doPlayerSendTextMessage(cid,4,"A Guild "..param.." foi adicionada com sucesso!") setGlobalStorageValue(12343,getGuildId(param)) else doPlayerSendTextMessage(cid,4,"Nome inválido.") end elseif words == '!guild2' then if (getGuildId(param)) then doPlayerSendTextMessage(cid,4,"A Guild "..param.." foi adicionada com sucesso.") setGlobalStorageValue(guild_2,getGuildId(param)) else doPlayerSendTextMessage(cid,4,"Nome inválido.") end elseif words == '!guildoff' then setGlobalStorageValue(guild_1,0) setGlobalStorageValue(guild_2,0) doPlayerSendTextMessage(cid,4,"Slots resetados.") end return true end mudei a storage porque essa storage e de algumas vip. entao pode ser isso. Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300677 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 @EDIT, o script ta dando , nao ta dando erro no distro porem não esta adicionando storage na guild ! :S Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300680 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 então o comando está certo? ah bom... afinal oq vc quer fazer com storages da guild cara? q eu n entendi nd pq oq vc pediu ai é o comando Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300682 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 sim vodkart coloquei e tals, mas nao quer da ;s Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300683 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 PRA QUE STORAGES NA GUILD? Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300686 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 Tipo quero um comando que adicionar storage para 2 guilds , Ex: !guild macumbeiros, comando vermelho .. Ai vai adicionar X storage para as 2 guilds, e tambem vai ter o comando de resetar que seria o !guildoff @tchubaka , tambem não deu o seu Porque eu fiz um Npc teleporter, que só teleporta players com X storages.. E queria fazer uma forma de War privado entre 2 Guilds , o Npc só teleporta players que tem as X storage, e eu queria um comando pra ja botar a storage nas 2 guilds só 1 por 1 comando : !guild NomeGuild1, NomeGuild2 .. e para resetar: !guildoff Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300687 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 não to te entendendo, é a mesma storage para as 2 guild? afinal qual o MOTIVO de adicionar storages para a mesma guild? Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300697 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 Sim , a mesma storage para as 2 guilds .. Para fazer tipo um sistema de war private, onde o Npc teleporta apenas players com o mesmo storage (E as 2 guilds vão ter as mesmas storages) , ai dps em como eu trocar as guilds usando o !guildoff (para resetar as guilds) @DESCULPA PELA DEMORA, FUI COMPRAR ALMOÇO Nada ?? :S Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300725 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 só me mandar o npc q eu resolvo lol Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300756 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 local price = 50 local config = { pos1 = {x=160,y=54,z=7}, pos2 = {x=980,y=924,z=7}, } 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, 'war')) then if getPlayerStorageValue(cid, 12343) - os.time() <= 0 then selfSay('Sorry, but your guild does not have access to a private area of war.',cid) return TRUE end talkState[talkUser] = 1 selfSay("Good luck in war!", cid) doTeleportThing(cid, config.pos1) elseif (msgcontains(msg, 'war')) and talkState[talkUser] == 1 then if doPlayerRemoveMoney(cid, price)==true then doTeleportThing(cid, config.pos1) else return selfSay('Você não tem money para viajar',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) AI O NPC VODKART Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300757 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 25, 2012 Share Postado Julho 25, 2012 (editado) npc 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 local pos1,pos2 = {x=160,y=54,z=7},{x=165,y=54,z=7} local storages = {99555,99556} if(msgcontains(msg, 'war')) then if getGlobalStorageValue(storages[1]) == getGuildId(getPlayerGuildName(cid)) or getGlobalStorageValue(storages[2]) == getGuildId(getPlayerGuildName(cid)) then selfSay("Good luck in war!", cid) doTeleportThing(cid, getGlobalStorageValue(storages[1]) == getGuildId(getPlayerGuildName(cid)) and pos1 or pos2) else selfSay('Sorry, but your guild does not have access to a private area of war.',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Editado Julho 25, 2012 por Vodkart Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300769 Compartilhar em outros sites More sharing options...
0 romeu23 0 Postado Julho 25, 2012 Autor Share Postado Julho 25, 2012 aé Deu vodkart ! vlww haha REP+ Duvida sanada Link para o comentário https://xtibia.com/forum/topic/190480-talkaction-guild-storage/#findComment-1300772 Compartilhar em outros sites More sharing options...
Pergunta
romeu23 0
Presciso de um script que seja um comando para adicionar storage em todos os players da guild Ex: !guild1 NOMEDAGUILD e de resetar a guild que tiver na guild1 , Ex: !guild1off
Estou usando essa e nao esta dando certo !
Alguem? presciso urgente!!
ALGUEM ME AJUDA AI ? VALENDO REP+ PLIX!!
Link para o comentário
https://xtibia.com/forum/topic/190480-talkaction-guild-storage/Compartilhar em outros sites
20 respostass a esta questão
Posts Recomendados