
Tudo que moskitinho postou
-
[Ajuda] Erros no Gesior
UP -
-
[Ajuda] Erros no Gesior
UP -
-
[Ajuda] Erros no Gesior
Olá pessoal, Estou na reta final pra lançar o servidor e comecei a lidar com o site, porém essa área eu não tenho a minima noção e conto com a ajuda de vocês. Instalei o Gesior 2012 8.6 e funcionou tudo legal, criei account tudo certinho... Mas nem tudo é perfeito 1 - Na aba 'Library/Videos' quando clico em videos. Eu queria a page funcionando para que eu postasse vídeos do server. Error occured! Error ID: CRITICAL ERROR More info: Cannot load page videos, file does not exist. File: C:\xampp\htdocs\system/load.compat.php Line: 20 File: C:\xampp\htdocs/index.php Line: 35 load.compat.php index.php 2 - Na aba 'Communnity/Cast System'. Aqui eu queria tirar a opção Cast System, porque não vai ter. Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\castsystem.php on line 159 3 - Em htdocs/pages eu vi que tem várias páginas que estão desativadas, uma delas é 'Powergamers' como faço pra ativar? 4 - Como faço pra Networks ficar igual ao global? com Share e Like.
-
[Ajuda] Not enought memory
@Mathwsz Valeu bro, mas não deu certo... Eu fiz o que diziam no tópico mas continuou o erro... EDIT - Resolvido! Bom eu não sei se vai funcionar pra todo mundo... Mas aqui deu certo... Vamos lá minha distro era x32 e era esse o "erro". A solução que eu achei foi baixar a distro x64 do TFS 8.6 AQUI NO FORUM e substitui na pasta do OT... O server abrir aqui, agora vou ver se vai ter algum bug.
-
[Ajuda] Not enought memory
Olá pessoal, Estou na reta final pra abrir o server, e hoje comecei a lidar com o site e foi tudo tranquilo a instalação do Gesior tudo funcionando. Criei uma account pelo site e fui abrir o server pra testar. Meu mapa tem 8mb apenas. Eu usei esse server como base Styller YourOTs Gold Edition e em sqlite ele tá rodando normal. Já ficou 72 horas online sem cair, mas foi eu mudar a database pra mysql ele nem abre quando da esse erro. Já usei o Laatido e não resolveu, se alguém souber me ajudar.
-
GesiorACC 2019 8.60 UPDATE 29/06/2019
Fui instalar aqui e deu este erro, se alguém puder me ajudar agradeço! Error occured! Error ID: More info: ERROR: #C-1 : Class::ConfigLUA - Line 241 of LUA config file is not valid [key: rateSkill] File: C:\xampp\htdocs\classes/configlua.php Line: 59 File: C:\xampp\htdocs\classes/configlua.php Line: 20 File: C:\xampp\htdocs\classes/configlua.php Line: 12 File: C:\xampp\htdocs/install.php Line: 249 EDIT: Arrumei... O erro era que o skillRate e o magicRate estavam na mesma linha. EDIT 2 Quando clico em Videos Error occured! Error ID: CRITICAL ERROR More info: Cannot load page videos, file does not exist. File: C:\xampp\htdocs\system/load.compat.php Line: 20 File: C:\xampp\htdocs/index.php Line: 33
-
[Ajuda] Ganhar storage quando mata monstro
@Kemmlly Deu certo camarada, muito obrigado!
-
[Ajuda] Ganhar storage quando mata monstro
Olá pessoal, Uma dúvida... Quero que quando eu mate o monstro 'raging halcrof' o player ganhe a storage 3877. Eu coloquei o creature script registrei no login, mas não funcionou, segue abaixo os scripts. creaturescripts/scripts/halcrofkill.lua local monster = 'raging halcrof' -- coloque o nome todo minusculo local storage = 3877 -- valor da Storage local msg = 'Congratulations take the blue tome and enjoy at Draenor Quests.' -- Configure a gosto function onKill(cid, target, lastHit) if(isMonster(cid)) and getCreatureName(cid):lower() == monster then setPlayerStorageValue(lastHit, storage, 1) doPlayerSendTextMessage(lastHit, 22, msg) end return true end login.lua registerCreatureEvent(cid, "Halcrofkill") creaturescripts.xml <event type="kill" name="Halcrofkill" script="halcrofkill.lua"/> monsters/raging halcrof.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Raging Halcrof" nameDescription="a raging halcrof" race="blood" experience="8000" speed="280" manacost="0"> <health now="8500" max="8500"/> <look type="130" head="38" body="39" legs="23" feet="50" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="1000"/> </flags> <script> <event name="Inquisition"/> <event name="Halcrofkill"/> </script> <attacks> <attack name="melee" interval="2000" skill="70" attack="60"/> <attack name="physical" interval="1000" chance="35" range="7" min="-265" max="-485"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="-90" max="-160"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="-350" max="-420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="-265" max="-345"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="25" defense="30"> <defense name="healing" interval="1000" chance="25" min="50" max="100"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="invisible" interval="5000" chance="10" duration="5000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="70"/> <element holyPercent="20"/> <element physicalPercent="-30"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="50"> <voice sentence="Get out my face apprentice useless!"/> <voice sentence="You are not prepared for the Draenor missions!"/> <voice sentence="Do not let me escape!"/> </voices> <loot> <item id="2148" countmax="80" chance="36500"/><!-- gold coin --> <item id="2148" countmax="70" chance="3t6500"/><!-- gold coin --> <item id="2792" countmax="5" chance="5000"/><!-- dark mushroom --> <item id="2167" chance="3000"/><!-- energy ring --> <item id="2600" chance="10000"/><!-- inkwell --> <item id="2178" chance="2500"/><!-- mind stone --> <item id="1987" chance="100000"><!-- bag --> <inside> <item id="2436" chance="3000"/><!-- skull staff --> <item id="2151" chance="5500"/><!-- talon --> <item id="7591" chance="12500"/><!-- great health potion --> <item id="7590" chance="10000"/><!-- great mana potion --> <item id="1984" chance="100000"/><!-- blue robe --> <item id="7368" countmax="4" chance="1200"/><!-- assassin star --> <item id="2146" chance="1400"/><!-- small sapphire --> <item id="1986" chance="800"/><!-- red tome --> <item id="2123" chance="850"/><!-- ring of the sky --> <item id="2197" chance="750"/><!-- stone skin amulet --> <item id="7898" chance="450"/><!-- lightning robe --> <item id="7895" chance="450"/><!-- lightning legs --> <item id="2466" chance="375"/><!-- golden armor --> <item id="2114" chance="100"/><!-- piggy bank --> </inside> </item> </loot> </monster> npc que faz o check da storage: local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10}, storage = 3877 -- Storage } 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, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) >= tab.level) and getPlayerStorageValue(cid, tab.storage) < 1 then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) --setPlayerStorageValue(cid, tab.storage, 1) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) elseif getPlayerStorageValue(cid, tab.storage) == 1 then selfSay('You already have proved me your strength! And I have given you the Blue Tome...', cid) elseif (getPlayerLevel(cid) < tab.level) then talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or more.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Eu tirei o setstorage do NPC, porque justamente quero que o player ganhe a storage matando o boss e não falando com o NPC uma vez apenas. Pra que caso o player morra pro boss ele possa tentar de novo. mas o problema em sí é que o monstro quando morto não da a storage...
- [Sistema] Battlefield Event! V.1
- [Pedido] Evento Devil Square !
-
[Dúvida] Script Yalahar Quest
@Ragnar Lothbrook actions.xml <!-- Yalaharian 10th --> <action actionid="58261" event="script" value="quests/azerus.lua"/> <action actionid="58263" event="script" value="quests/azerus.lua"/> <action actionid="58267" event="script" value="quests/azeruschest.lua"/> <action actionid="58268" event="script" value="quests/azeruschest.lua"/> <action actionid="58269" event="script" value="quests/azeruschest.lua"/> actions/scripts/azerus.lua local BlindField = {x = 488, y = 179, z = 7, stackpos=1} function mapArea(fromPos, toPos, stack) local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z} return function() if (pos.y < toPos.y) then pos.y = pos.y+1 elseif (pos.x <= toPos.x) then pos.y = fromPos.y pos.x = pos.x+1 else pos.x = fromPos.x pos.y = fromPos.y pos.z = pos.z+1 end if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then if (stack == nil) then return pos else pos.stackpos = stack return pos, getThingfromPos(pos) end end end end function getMonstersfromArea(fromPos, toPos) local monsters = {} for _, thing in mapArea(fromPos, toPos, 253) do if isMonster(thing.uid) == TRUE then table.insert(monsters, thing.uid) end end local bfm = getThingfromPos(BlindField) if isMonster(bfm.uid) == TRUE then table.insert(monsters, bfm.uid) end return monsters end function onUse(cid, item, fromPosition, itemEx, toPosition) local topLeft = {x = 480, y = 178, z = 7} local buttomRight = {x = 499, y = 198, z = 7} local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tp = {x = 490, y = 197, z = 7} local glo = {x = 490, y = 188, z = 7} local function FirstWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) end local function FifthWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SecondWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SixthWave() doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function ThirdWave1() -- with 2s delay doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function FourthWave() doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function SevenWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function Glllobe() local monst = getMonstersfromArea(topLeft, buttomRight) for i = 1, #monst do doRemoveCreature(monst[i]) end local item1 = getTileItemById(glo, 9767) doItemSetAttribute(item1.uid, "aid", 58261) end local function createWall(p) local janek = doCreateItem(1387,1,{x = 491, y = 199, z = 6}) doItemSetAttribute(janek, "aid", 9105) end local function createWalll(i) local ela = doCreateItem(1387,1,{x = 490, y = 197, z = 7}) doItemSetAttribute(ela, "aid", 9106) end local wall0 = {x = 491, y = 199, z = 6, stackpos=1} local getwall0 = getThingfromPos(wall0) local wall1 = {x = 490, y = 197, z = 7, stackpos=1} local getwall1 = getThingfromPos(wall1) local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tele_chk = getTileItemById(tp, 1387) if item.actionid == 58261 then doItemSetAttribute(item.uid, "aid", 58263) end if tele_chk.uid > 0 then doRemoveItem(getTileItemById(tp,1387).uid) doRemoveItem(getwall0.uid,1) addEvent(FirstWave, 0) addEvent(FifthWave, 30000) addEvent(SecondWave, 60000) addEvent(SixthWave, 90000) addEvent(ThirdWave, 120000) addEvent(ThirdWave1, 150000) addEvent(FourthWave, 180000) addEvent(SevenWave, 210000) addEvent(Glllobe, 400000) p = {wallid = getwall0.itemid} addEvent(createWall, 300*1000, p) i = {wallid = getwall1.itemid} addEvent(createWalll, 300*1000, i) end if item.actionid == 58263 then doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) end return TRUE end movements.xml <!-- Yalahar 10th --> <movevent type="StepIn" itemid="9738" event="script" value="azerusdeath.lua"/> <movevent type="StepIn" actionid="58262" event="script" value="azerusarmy.lua"/> movements/scripts/azerusdeath.lua function onStepIn(cid, item, position, fromPosition) local yalahar = {x = 543, y = 185, z = 5, stackpos=253} if item.itemid == 9738 then doTeleportThing(cid, yalahar, TRUE) doSendMagicEffect(yalahar,12) end return TRUE end movements/scripts/azerusarmy.lua function onStepIn(cid, item, position, fromPosition) if item.actionid == 58262 then if getPlayerStorageValue(cid, 10510) == -1 then doCreatureSay(cid, "It seems by defating Azerus you have stopped this army from entering your world! Better leave this gastly place forever.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 10510, 1) end return TRUE end end Obs.: Lembrando que o script está funcionando, o problema é que no final ele não faz o clean dos monstros na sala para o próximo time a fazer... E os portais de entrada e saída quando voltam a aparecer não funcionam.
-
[Ajuda] Addons por Quest
Ajudou sim bro! Valeu :D O segundo era outro erro, mas eu encontrei o problema e tá tudo 100%
-
[Ajuda] Addons por Quest
@KotZlet Obrigado bro, estou aprendendo e na verdade não sabia que cada if era uma coluna aberta... Mas valeu a ajuda... Então ai peguei o Varkhal e mudei algumas coisas, mas não funcionou também... local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 npcHandler:setMessage(MESSAGE_GREET, "Huhuhuuhuh |PLAYERNAME|. You want to look beautiful YEAAH?! Just say {addons} or {help} if you don't know what to do.") function playerBuyAddonNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then npcHandler:say('Sorry, but this addon is only for premium players!', cid) npcHandler:resetNpc() return true end if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then npcHandler:say('You already have this addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then doPlayerRemoveMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon) doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon) setPlayerStorageValue(cid,addoninfo.storageID,1) npcHandler:say('Here you are.', cid) else npcHandler:say('You do not have needed items or cash!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Not interested? Maybe other addon?', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) -- hunter (done) local outfit_node = keywordHandler:addKeyword({'hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{10574,100}, {5879,100}}, outfit_female = 137, outfit_male = 129, addon = 3, storageID = 10003}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- knight (done) local outfit_node = keywordHandler:addKeyword({'knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5930,50}, {5893,100}}, outfit_female = 139, outfit_male = 131, addon = 3, storageID = 10005}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- mage (done) local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10006}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- summoner (done) local outfit_node = keywordHandler:addKeyword({'summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5879,100}}, {{5911,100}}, {{5920,50}}, {{5882,50}}, outfit_female = 141, outfit_male = 133, addon = 3, storageID = 10009}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- barbarian (done) local outfit_node = keywordHandler:addKeyword({'barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5930,50}, {5893,100}}, {5948,100}}, outfit_female = 147, outfit_male = 143, addon = 3, storageID = 10011}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- druid (done) local outfit_node = keywordHandler:addKeyword({'druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{10574,100}, {5898,100}}, {11367,100}}, outfit_female = 148, outfit_male = 144, addon = 3, storageID = 10013}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nobleman (done) local outfit_node = keywordHandler:addKeyword({'nobleman addon'}, playerBuyAddonNPC, {premium = true, cost = 10000000, items = {}, outfit_female = 140, outfit_male = 132, addon = 3, storageID = 10015}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- oriental (done) local outfit_node = keywordHandler:addKeyword({'oriental addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5877,100}}, {{5948,100}}, {{5879,100}}, outfit_female = 150, outfit_male = 146, addon = 3, storageID = 10017}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- wizard (done) local outfit_node = keywordHandler:addKeyword({'wizard addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{11367,100}, {5898,100}, outfit_female = 149, outfit_male = 145, addon = 3, storageID = 10021}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- beggar (done) local outfit_node = keywordHandler:addKeyword({'beggar addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{10609,500}, outfit_female = 157, outfit_male = 153, addon = 3, storageID = 10025}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- shaman (done) local outfit_node = keywordHandler:addKeyword({'shaman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{10582,200}, outfit_female = 158, outfit_male = 154, addon = 3, storageID = 10029}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- brotherhood (done)(custom) local outfit_node = keywordHandler:addKeyword({'brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,3500}}, outfit_female = 279, outfit_male = 278, addon = 3, storageID = 10039}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you {citizen}, {hunter}, {knight}, {mage}, {nobleman}, {summoner}, {warrior}, {barbarian}, {druid}, {wizard}, {oriental}, {pirate}, {assassin}, {beggar}, {shaman}, {norseman}, {nighmare}, {jester}, {yalaharian}, {brotherhood}, {warmaster} and {wayfarer} addons.'}) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy addon say NAME addon.'}) keywordHandler:addKeyword({'citizen addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You explored the Rotworm cave today?'}) keywordHandler:addKeyword({'warrior addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Residents say the Demons stole the sword and all the rest ...'}) keywordHandler:addKeyword({'assassin addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Help the server buying a Addon Doll.'}) keywordHandler:addKeyword({'pirate addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Help the server buying a Addon Doll.'}) keywordHandler:addKeyword({'jester addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Help the server buying a Addon Doll.'}) keywordHandler:addKeyword({'demonhunter addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You need complete the Inquisition Quest.'}) keywordHandler:addKeyword({'nightmare addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You need complete the Sign of the Cross Quest.'}) keywordHandler:addKeyword({'yalaharian addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You need complete the Yalahar Quest.'}) keywordHandler:addKeyword({'warmaster addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You explored the Undead Dragon cave today?'}) keywordHandler:addKeyword({'wayfarer addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Only the best players have this addon, complete the Wrath of the Emperor Quest.'}) keywordHandler:addKeyword({'norseman addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'That huge animals and green ... led the Eskimo.'}) npcHandler:addModule(FocusModule:new()) Agradeço se puder ajudar #EDIT Haha encontrei o erro... as '{}' dos itens estavam totalmente erradas e ai bugava o script.
-
[Ajuda] Addons por Quest
Olá pessoal a dúvida é simples, quero fazer quests que dão addons como recompensa. Mas na hora e abrir o servidor... action/scripts/mage.lua function onUse(cid, item, frompos, item2, topos) prize = item.uid if prize > 0 and prize < 5000 then queststatus = getPlayerStorageValue(cid,26087) if queststatus == -1 then doCreatureSay(cid, "You have found first Mage addon.", TALKTYPE_ORANGE_1) doPlayerAddOutfit(cid, 138, 1) doPlayerAddOutfit(cid, 130, 1) setPlayerStorageValue(cid,26087,1) else doPlayerSendTextMessage(cid,22,"Is empty.") end
-
[Pedido] NPC Bless 8.6
@Kemmlly actions/scripts/azerus.lua local BlindField = {x = 488, y = 179, z = 7, stackpos=1} function mapArea(fromPos, toPos, stack) local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z} return function() if (pos.y < toPos.y) then pos.y = pos.y+1 elseif (pos.x <= toPos.x) then pos.y = fromPos.y pos.x = pos.x+1 else pos.x = fromPos.x pos.y = fromPos.y pos.z = pos.z+1 end if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then if (stack == nil) then return pos else pos.stackpos = stack return pos, getThingfromPos(pos) end end end end function getMonstersfromArea(fromPos, toPos) local monsters = {} for _, thing in mapArea(fromPos, toPos, 253) do if isMonster(thing.uid) == TRUE then table.insert(monsters, thing.uid) end end local bfm = getThingfromPos(BlindField) if isMonster(bfm.uid) == TRUE then table.insert(monsters, bfm.uid) end return monsters end function onUse(cid, item, fromPosition, itemEx, toPosition) local topLeft = {x = 480, y = 178, z = 7} local buttomRight = {x = 499, y = 198, z = 7} local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tp = {x = 490, y = 197, z = 7} local glo = {x = 490, y = 188, z = 7} local function FirstWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) end local function FifthWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SecondWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SixthWave() doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function ThirdWave1() -- with 2s delay doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function FourthWave() doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function SevenWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function Glllobe() local monst = getMonstersfromArea(topLeft, buttomRight) for i = 1, #monst do doRemoveCreature(monst[i]) end local item1 = getTileItemById(glo, 9767) doItemSetAttribute(item1.uid, "aid", 58261) end local function createWall(p) local janek = doCreateItem(1387,1,{x = 491, y = 199, z = 6}) doItemSetAttribute(janek, "aid", 9105) end local function createWalll(i) local ela = doCreateItem(1387,1,{x = 490, y = 197, z = 7}) doItemSetAttribute(ela, "aid", 9106) end local wall0 = {x = 491, y = 199, z = 6, stackpos=1} local getwall0 = getThingfromPos(wall0) local wall1 = {x = 490, y = 197, z = 7, stackpos=1} local getwall1 = getThingfromPos(wall1) local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tele_chk = getTileItemById(tp, 1387) if item.actionid == 58261 then doItemSetAttribute(item.uid, "aid", 58263) end if tele_chk.uid > 0 then doRemoveItem(getTileItemById(tp,1387).uid) doRemoveItem(getwall0.uid,1) addEvent(FirstWave, 0) addEvent(FifthWave, 30000) addEvent(SecondWave, 60000) addEvent(SixthWave, 90000) addEvent(ThirdWave, 120000) addEvent(ThirdWave1, 150000) addEvent(FourthWave, 180000) addEvent(SevenWave, 210000) addEvent(Glllobe, 400000) p = {wallid = getwall0.itemid} addEvent(createWall, 300*1000, p) i = {wallid = getwall1.itemid} addEvent(createWalll, 300*1000, i) end if item.actionid == 58263 then doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) end return TRUE end movements/scripts/azerusarmy function onStepIn(cid, item, position, fromPosition) if item.actionid == 58262 then if getPlayerStorageValue(cid, 10510) == -1 then doCreatureSay(cid, "It seems by defating Azerus you have stopped this army from entering your world! Better leave this gastly place forever.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 10510, 1) end return TRUE end end movements/scripts/azerusdeath function onStepIn(cid, item, position, fromPosition) local yalahar = {x = 543, y = 185, z = 5, stackpos=253} if item.itemid == 9738 then doTeleportThing(cid, yalahar, TRUE) doSendMagicEffect(yalahar,12) end return TRUE end E aproveitando eu fiz a WOTE e funcionou tudo certinho. Mas os itens de Zao paracem não estar danos os bonus de skill e absorb. <item id="12644" article="a" name="shield of corruption"> <attribute key="weight" value="4900" /> <attribute key="defense" value="36" /> <attribute key="weaponType" value="shield" /> <attribute key="skillSword" value="3" /> <attribute key="showattributes" value="1" /> </item> O código parece estar certo e outros itens dão o bonus normal, apenas os de zao não.
-
[Pedido] NPC Bless 8.6
Vacilo meu, achei que o position era a posição do SQM, mas o sqm é pela action... Valeu bro! Graças a você POI 100% funcionando e o NPC challenge também. Por acaso manja da funcionamento da Yalahar last room? Meu script funciona até o final, ele tira os portais pra ninguém descer no meio da quest, porém quando acaba e eles voltam, param de funcionar. E também a sala não reseta pro próximo time.
-
[Pedido] NPC Bless 8.6
@Kemmlly #Edit mexi aqui e deu certo, porém como faço para o player ser teleportado para a coordenada {x = 830, y = 71, z = 7} caso não tenha o storage? function onStepIn(cid, item, pos) local position = {x = 830, y = 70, z = 7} local position2 = {x = 830, y = 69, z = 7} if getPlayerStorageValue(cid, 10274) == 1 and getPlayerStorageValue(cid, 10275) == 1 and getPlayerStorageValue(cid, 10276) == 1 and getPlayerStorageValue(cid, 10277) == 1 and getPlayerStorageValue(cid, 10278) == 1 and getPlayerStorageValue(cid, 10279) == 1 and getPlayerStorageValue(cid, 10280) == 1 then doTeleportThing(cid, position) doSendMagicEffect(position,10) else doTeleportThing(cid, position2) doSendMagicEffect(position2,10) end end No caso position é a posição do check dos storages E position 2 a posição que vai caso tenha Queria uma position 3 que o player seria teleportado pra traz caso não tenha.
-
[Dúvida] Script Yalahar Quest
@VictorTasquinTestei aqui, ele manda a primeira wave e para. Isso é movements/scripts/azerus.lua function onStepIn(cid, item, position, fromPosition) --Config--> local queststatus = getPlayerStorageValue(cid, 50001) --EndConfig--> if item.actionid == 1974 and queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.") setPlayerStorageValue(cid, 4765, 1) return TRUE end if item.actionid == 1973 and queststatus == -1 then -- Here is the code start: starting={x = 478, y = 178, z = 7, stackpos = 253} checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos} ending={x = 499, y = 199, z = 7, stackpos = 253} players=0 totalmonsters=0 monster = {} repeat creature= getThingfromPos(checking) if creature.itemid > 0 then if getPlayerAccess(creature.uid) == 0 then players=players+1 end if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then totalmonsters=totalmonsters+1 monster[totalmonsters]=creature.uid end end checking.x=checking.x+1 if checking.x>ending.x then checking.x=starting.x checking.y=checking.y+1 end until checking.y>ending.y if players==0 then trash= {x = 537, y = 181, z = 6} current=0 repeat current=current+1 doTeleportThing(monster[current],trash) until current>=totalmonsters end -- Here is the end of it doTeleportThing(cid, player_pos_entrada) doSendMagicEffect(player_pos_entrada, 10) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You already done this quest!') end end Substitui algumas coisas mas agora não aparece nem a primeira wave.
-
[Dúvida] Script teleport
@VictorTasquin Muito obrigado irmão! Ajudou muito! O server tá quase 100% graças a galera ajudando!
-
[Pedido] NPC Bless 8.6
npc/scripts/blesser.lua (crie esse documento e dentro coloque o que está abaixo) local tab = { price = 50, -- Preco BLESS, 50 = 50k price2 = 20 -- Preco AOL, 20 = 20k } local bless = {1, 2, 3, 4, 5} 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, 'bless')) then talkState[talkUser] = 1 selfSay('Deseja comprar todas as bles? Isso ira te custar '..tab.price..'k!', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then for i = 1, table.maxn(bless) do if getPlayerBlessing(cid, bless[i]) then selfSay('Voce ja tem todas as blessings.', cid) elseif (doPlayerRemoveMoney(cid, tab.price) == TRUE) then doPlayerAddBlessing(cid, bless[i]) talkState[talkUser] = 0 selfSay('Voce comprou todas as blessings.', cid) doSendMagicEffect(getPlayerPosition(cid), 49) elseif (doPlayerRemoveMoney(cid, tab.price) == FALSE) then selfSay('Voce nao tem dinheiro suficiente!', cid) end end elseif msgcontains(msg, 'aol') then talkState[talkUser] = 2 selfSay('Deseja comprar uma AOL por '..tab.price2..'k?', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if (doPlayerRemoveMoney(cid, tab.price2) == TRUE) then doPlayerAddItem(cid,2173,1) talkState[talkUser] = 0 doSendMagicEffect(getPlayerPosition(cid),6) selfSay('Aqui esta sua AOL!', cid) else selfSay('Voce nao tem dinheiro suficiente!', cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) data/npc/Huvry, the Blesser.lua <?xml version="1.0" encoding="UTF-8"?> <npc name="Huvry, the Blesser" script="data/npc/scripts/blesser.lua" walkinterval="60000" floorchange="0"> <health now="100" max="100"/> <look type="300" corpse="8955"/> <parameters> <parameter key="message_greet" value="Hello! Do you want to buy all bless?"/> </parameters></npc> E tá feito, ai só importar ele pelo RME e colocar no mapa.
-
[Pedido] NPC Bless 8.6
@Kemmlly Muito obrigado! Só uma dúvida, vou usar esse script para que o player só passe pelo sqm se tiver os storageid. Mas está montado da forma errada... function onStepIn(cid, item, pos) local position = {x = 830, y = 70, z = 7} local position2 = {x = 830, y = 69, z = 7} if (getPlayerStorageValue(cid, 10274, 10275, 10276, 10277, 10278, 10279, 10280) == 1 then doTeleportThing(cid, position) doSendMagicEffect(position,10) else doTeleportThing(cid, position2) doSendMagicEffect(position2,10) end end
-
[Pedido] NPC Bless 8.6
@Kemmlly Camarada não querendo abusar da sua boa vontade, mas já o fazendo. Tenho esse npc no server que teleporta o player para o local se tiver level 100+ , mas queria saber se é possível adicionar um storageid nele para que o player possa ser teleportado apenas uma vez. Mas caso ele não mate o boss ai pode tentar novamente. local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } 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, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) >= tab.level) then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or more.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
[Dúvida] Script Yalahar Quest
Galera vou ser bem objetivo no problema. Consegui montar a Yalahar Quest no server. E está funcionando normal, as waves, o sqm no void, só poder clicar 1x no globo, os portais fechando... O que não funcionou é que em certo momento o Azerus da sala DEVERIA ser removido, para entrar o Azerus1. Mas isso não funciona e ficam dois Azerus na sala. Bem como o clear da room também não funciona e os próximos a fazer já começam com bixos que sobraram. movements/scripts function onStepIn(cid, item, position, fromPosition) --Config--> local queststatus = getPlayerStorageValue(cid, 50001) --EndConfig--> if item.actionid == 1974 and queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.") setPlayerStorageValue(cid, 4765, 1) return TRUE end if item.actionid == 1973 and queststatus == -1 then -- Here is the code start: starting={x = 480, y = 178, z = 7, stackpos = 253} checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos} ending={x = 500, y = 199, z = 7, stackpos = 253} players=0 totalmonsters=0 monster = {} repeat creature= getThingfromPos(checking) if creature.itemid > 0 then if getPlayerAccess(creature.uid) == 0 then players=players+1 end if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then totalmonsters=totalmonsters+1 monster[totalmonsters]=creature.uid end end checking.x=checking.x+1 if checking.x>ending.x then checking.x=starting.x checking.y=checking.y+1 end until checking.y>ending.y if players==0 then trash= {x = 470, y = 188, z = 7} current=0 repeat current=current+1 doTeleportThing(monster[current],trash) until current>=totalmonsters end -- Here is the end of it doTeleportThing(cid, player_pos_entrada) doSendMagicEffect(player_pos_entrada, 10) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You already done this quest!') end end action/scripts function onUse(cid, item, frompos, item2, topos) --Config--> local statue_pos = {x = 490, y = 188, z = 7} local new_portal_pos = {x = 490, y = 189, z = 7, stackpos = 1} local new_pos = {x = 542, y = 196, z = 5} local crystal_pos = {x = 490, y = 197, z = 7} --End Config--> function Potwoory1() doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster("Azerus", {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwoory2, 7 * 700) end function Potwoory2() doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster("Azerus", {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwory2, 30 * 1000) end function Potwoory3() removeFieldsTile() removeAzerusMonstersInArea() doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) doCreateMonster("Azerus1", {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) addEvent(Potwory3, 35 * 1000) end function Potwoory4() removeFieldsTile() removeAzerusMonstersInArea() doCreateMonster('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253}) doCreateMonster('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253}) doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253}) end function NewPortal() doCreateTeleport(1387, new_pos, new_portal_pos) addEvent(RemoveAll, 30 * 1000) end function RemoveAll() doRemoveItem(getThingfromPos(new_portal_pos).uid,1) doItemSetAttribute(getTileItemById(crystal_pos, 7493).uid, "aid", 57500) end if item.aid == 57500 and getThingfromPos(new_portal_pos).itemid ~= 17668 then doCreateItem(17668,1,new_portal_pos) addEvent(Potwoory1, 0) doItemSetAttribute(getTileItemById(crystal_pos, 7493).uid, "aid", 57501) else doPlayerSendTextMessage(cid,18,"Sorry, not possible.") end return TRUE end Agradeço quem puder ajudar.
-
[Dúvida] Script teleport
Olá colegas, Estou fazendo o possível pra tirar apenas as dúvidas que eu não encontro forma de resolver e surgiu mais uma. Na Pits of Inferno tem uma parte que você precisa ter o The Holy Tible para passar pelo SQM X e ser transportado para SQM Y, caso não tenha o livro nada acontece. É esse script que desejo. 1. Para evitar spam, vou deixar outra dúvida aqui também. 2. Criei com ajuda do pessoal aqui do fórum um monstro que quando morre abre o portal para X local. Até ai tudo bem, mas o portal abre sempre onde o monstro morre, queria que ele abrisse em uma coordenada XYZ. local config = { message = "Take the Blue Tome, you have 60 seconds to leave! The room will collapse!", timeToRemove = 60, -- seconds teleportId = 1387, bosses = { ["Raging Halcrof"] = {teleportPos = {x = 1071, y = 1124, z = 10, stackpos = 1}, toPos = {x = 1066, y = 1125, z = 6}} } } local function removal(position) doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) return TRUE end function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "halcrofteleport") local position = getCreaturePosition(cid) for name, pos in pairs(config.bosses) do if name == getCreatureName(cid) then teleport = doCreateTeleport(config.teleportId, pos, position) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) doSendMagicEffect(position,10) end end return TRUE end Esse é o script que estou usando mas não está funcionando. Ele abre o portal no corpo do monstro e não está enviando o player para posição desejada. 3. Esse é um NPC que o jogador vai desafiar se tiver lvl 100+ pode aceitar, então é movido para sala. Onde luta com o boss e se o player morrer pode tentar novamente, mas se conseguir eu queria criar um storageid onde o npc checasse se o player já derrotou o boss e se sim, não pode fazer de novo. local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } 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, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) <= tab.level) then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or less.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agradeço desde já galera.
-
[Dúvida] Action Anihilator 8.6
Obrigado Victor!