Bennyhappy 2 Postado Outubro 19, 2012 Share Postado Outubro 19, 2012 (editado) Jogadores na área frompos, topos, a morte, que se > = 2 global storage jogadores teleportado uma área e remover um globalstorage, e se globalStorage == 1 teleporte templo e entrega de prémio e remover monstros em area frompos, topos. Editado Outubro 19, 2012 por beenii Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/ Compartilhar em outros sites More sharing options...
0 fredpadua 65 Postado Outubro 19, 2012 Share Postado Outubro 19, 2012 Seja mais claro no seu pedido. Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1366663 Compartilhar em outros sites More sharing options...
0 Bennyhappy 2 Postado Outubro 19, 2012 Autor Share Postado Outubro 19, 2012 emm é um evento do último sobrevivente, quando entram no evento, eles são atribuídos, um globalevent, Eu preciso que quando um jogador morre no evento, em area frompos , topos, >= 2 global storage, teleport para uma área, e cuando vaia globalstorage == 1 teleported a temple e receber um prêmio, e remover monstros na área, frompos, topos bump Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1366677 Compartilhar em outros sites More sharing options...
0 KUNGLOW 14 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 Explique mais claramente Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1367366 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 Explique mais claramente Tome cuidado com este tipo de post @KUNGLOW ele ja tinha especificado como queria acima Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1367372 Compartilhar em outros sites More sharing options...
0 KUNGLOW 14 Postado Outubro 20, 2012 Share Postado Outubro 20, 2012 Sim, mas você conseguiu entender? Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1367503 Compartilhar em outros sites More sharing options...
0 Bennyhappy 2 Postado Outubro 21, 2012 Autor Share Postado Outubro 21, 2012 era o que você não entendeu KUNGLOW bump Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1367605 Compartilhar em outros sites More sharing options...
0 caotic 393 Postado Outubro 21, 2012 Share Postado Outubro 21, 2012 Vamos relembrar que flood e todo o post que serve apenas para aumentar a posição do tópico ou o numero do post do usuário Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1368528 Compartilhar em outros sites More sharing options...
0 brun123 369 Postado Outubro 21, 2012 Share Postado Outubro 21, 2012 Script: function onDeath(cid, corpse, killers) local globalStorage = getStorage(500) if globalStorage == -1 then return true end local frompos = {x = 100, y = 100, z = 7} local topos = {x = 110, y = 110, z = 7} local isInArea = false local ppos = getThingPos(cid) if ppos.x >= frompos.x and ppos.x <= topos.x and ppos.y >= frompos.y and ppos.y <= topos.y and ppos.z = frompos.z then isInArea = true end if isInArea and globalStorage >= 2 then local teleportPosition = {x = 700, y = 700, z = 7} doTeleportThing(cid, teleportPosition) doSendMagicEffect(teleportPosition, CONST_ME_TELEPORT) doSetStorage(globalStorage, -1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false end if isInArea and globalStorage == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerAddItem(cid, 2160, 100) doSetStorage(globalStorage, -1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) for x = frompos.x, topos.x do for y = frompos.y, topos.y do local p = {x = x, y = y, z = frompos.z} local c = getTopCreature(p).uid if c > 1 and isMonster(c) then doRemoveCreature(c) end end end return false end return true end Não testado Precisa adicionar a tag em creaturescripts.xml e registrar o evento no player em login.lua Se você souber inglês, escreva seu pedido tanto em português quanto em inglês, aumenta a chance de alguém entender o que você quer Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1368542 Compartilhar em outros sites More sharing options...
0 Bennyhappy 2 Postado Outubro 21, 2012 Autor Share Postado Outubro 21, 2012 nao funciono, me ajuda reparar este? nao remove monsters. help me repair this script maket by me, no remove monster, and crash server on death on area local config = { playerCount = 2020, -- Global storage for counting the players left/entered in the event gobletsur = 10127, -- id del premio con nombre. templeWait = {x = 8964, y = 8597, z = 6}, --- donde los jugadores muertos iran moneyReward = {12372, 15, 1}, -- second collumn(count) 0 if you don't want money to be used. or a stackable item you want more than 1 of. -- Estas coordenadas deben ser exactamente las misma del script en global event! fromPositions = {x = 8940, y = 8587, z = 7}, -- supongo k ya saben como es esto top left cornor of the playground toPositions = {x = 8958, y = 8605, z = 7}, -- bottom right cornor of the playground } local Event_Start = 3032 function onStatsChange(cid, attacker, type, combat, value) if combat == COMBAT_HEALING then return true end if getCreatureHealth(cid) > value then return true end if isInArea(getPlayerPosition(cid), config.fromPositions, config.toPositions) then if isPlayer(cid) and isMonster(attacker) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " Ah Muerto En The Surviving Event!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid,config.templeWait,false) doSendMagicEffect(config.templeWait,10) doCreatureAddHealth(cid,getCreatureMaxHealth(cid)) doCreatureAddMana(cid,getCreatureMaxMana(cid)) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) setPlayerStorageValue(cid, 97801, -1) setPlayerStorageValue(cid, 12811, - 1) --- reconoser players que entraron doRemoveConditions(cid,false) return true end if isInArea(getPlayerPosition(cid), config.fromPositions, config.toPositions) then if isPlayer(cid) and isMonster(attacker) then if getGlobalStorageValue(config.playerCount) == 1 then doBroadcastMessage(getPlayerName(cid) .. " Gano The Surviving Event! Congratulations!", MESSAGE_STATUS_WARNING) local gobletsur = doPlayerAddItem(cid, config.gobletsur, 1) doItemSetAttribute(gobletsur, "description", "Premio Para " .. getPlayerName(cid) .. " Por Ganar The Surviving Event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doCreatureAddHealth(cid,getCreatureMaxHealth(cid)) doCreatureAddMana(cid,getCreatureMaxMana(cid)) setPlayerStorageValue(cid, 97801, -1) doPlayerAddItem(cid, 12372, 15) doRemoveConditions(cid,false) setPlayerStorageValue(cid, 12811, - 1) --- reconoser players que entraron setGlobalStorageValue(Event_Start, 0) setGlobalStorageValue(config.playerCount, 0) return true end for x = config.fromPositions.x, config.toPositions.x do for y = config.fromPositions.y, config.toPositions.y do for z = config.fromPositions.z, config.toPositions.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end end return true end Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1369065 Compartilhar em outros sites More sharing options...
0 brun123 369 Postado Outubro 21, 2012 Share Postado Outubro 21, 2012 local config = { playerCount = 2020, -- Global storage for counting the players left/entered in the event gobletsur = 10127, -- id del premio con nombre. templeWait = {x = 8964, y = 8597, z = 6}, --- donde los jugadores muertos iran moneyReward = {12372, 15, 1}, -- second collumn(count) 0 if you don't want money to be used. or a stackable item you want more than 1 of. -- Estas coordenadas deben ser exactamente las misma del script en global event! fromPositions = {x = 8940, y = 8587, z = 7}, -- supongo k ya saben como es esto top left cornor of the playground toPositions = {x = 8958, y = 8605, z = 7}, -- bottom right cornor of the playground } local Event_Start = 3032 function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHGAIN or getCreatureHealth(cid) > value or not isCreature(attacker) then return true end local isInArea = isInArea(getPlayerPosition(cid), config.fromPositions, config.toPositions) if isInArea and isPlayer(cid) and isMonster(attacker) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage(getPlayerName(cid) .. " Ah Muerto En The Surviving Event!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, config.templeWait, false) doSendMagicEffect(config.templeWait, 10) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount) - 1) setPlayerStorageValue(cid, 97801, -1) setPlayerStorageValue(cid, 12811, - 1) --- reconoser players que entraron doRemoveConditions(cid, false) elseif getGlobalStorageValue(config.playerCount) == 1 then doBroadcastMessage(getPlayerName(cid) .. " Gano The Surviving Event! Congratulations!", MESSAGE_STATUS_WARNING) local gobletsur = doPlayerAddItem(cid, config.gobletsur, 1) doItemSetAttribute(gobletsur, "description", "Premio Para " .. getPlayerName(cid) .. " Por Ganar The Surviving Event.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) setPlayerStorageValue(cid, 97801, -1) doPlayerAddItem(cid, 12372, 15) doRemoveConditions(cid, false) setPlayerStorageValue(cid, 12811, - 1) --- reconoser players que entraron setGlobalStorageValue(Event_Start, 0) setGlobalStorageValue(config.playerCount, 0) end for x = config.fromPositions.x, config.toPositions.x do for y = config.fromPositions.y, config.toPositions.y do for z = config.fromPositions.z, config.toPositions.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end return false end return true end Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1369136 Compartilhar em outros sites More sharing options...
0 Bennyhappy 2 Postado Outubro 22, 2012 Autor Share Postado Outubro 22, 2012 irmão graças trabalhou muito bem. único problema ocorreu-me que, se eles morreram por outra jugadore ivan no nível 1, kkkk mas apenas pondre área non pvp no mapa xD! +rep você poderia dizer que ele estava ficando ruim no meu script? xD para saber mais: D Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1369307 Compartilhar em outros sites More sharing options...
0 Lummos 12 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Dúvida sanada, tópico reportado para que movam. Link para o comentário https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/#findComment-1374150 Compartilhar em outros sites More sharing options...
Pergunta
Bennyhappy 2
Jogadores na área frompos, topos, a morte, que se > = 2 global storage jogadores teleportado uma área e remover um globalstorage, e se globalStorage == 1 teleporte templo e entrega de prémio e remover monstros em area frompos, topos.
Editado por beeniiLink para o comentário
https://xtibia.com/forum/topic/196856-script-para-evento-ajuda/Compartilhar em outros sites
12 respostass a esta questão
Posts Recomendados