✅ Teleport Al matar un monster

jackye

Member
Messages
62
Points
163
Hola como estan amigos eh estado buscando un revscript que me ayude a poder crear un teleport cuando el monster muera ya intentne de muchas maneras incluso usar el de azerus pero no me funcionan podrian ayudarme?

Eh intentado con este y registrar los Eventos pero no logro que funcione D:
bossTeleportLogin
bossTeleportKill
bossConfig = {
bossName = "Troll",
storageToSet = 45320,
finalPosition = Position(32365, 32243, 5),
}

local bossTeleportKill = CreatureEvent("bossTeleportKill")
function bossTeleportKill.onKill(creature, target)
if not creature or not creature:isPlayer() then
return true
end

if not target or not target:isMonster() then
return true
end

if target:getName():lower() == bossConfig.bossName:lower() then
creature:setStorageValue(bossConfig.storageToSet, os.time() + 3600)
end
return true
end
bossTeleportKill:register()

local bossTeleportTile = MoveEvent()
function bossTeleportTile.onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return true
end

local player = Player(creature)
if (player:getStorageValue(bossConfig.storageToSet) > os.time()) then
player:teleportTo(bossConfig.finalPosition)
else
player:teleportTo(fromPosition)
player:say("Sorry, you need to kill the boss before going to this teleport.")
end
return true
end

bossTeleportTile:aid(50420)
bossTeleportTile:register()

local bossTeleportLogin = CreatureEvent("bossTeleportLogin")
function bossTeleportLogin.onLogin(player)
player:registerEvent('bossTeleportKill')
return true
end
bossTeleportLogin:register()
 
Solution
Hola Alex,





intente agregarlo de esa manera pero no me funciono

Perdona, actualicé el tema, ahora lo tienes corregido, el ultimo apartado el parrafo:


Debería de quedarte así, si solamente incorporas 1 solo script, como el del ejemplo , con el nombre tpkillboss

player:registerEvent("tpkillboss")
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Welcome to " .. SERVER_NAME .. " Server.!")

Ahora, si por ejemplo vas a crear 2 mas, el segundo se llamara tpkillbosssecond y el tercero tpkillbossthird, entonces quedaria en el login.php:


player:registerEvent("tpkillboss")
player:registerEvent("tpkillbosssecond")...
Hola como estan amigos eh estado buscando un revscript que me ayude a poder crear un teleport cuando el monster muera ya intentne de muchas maneras incluso usar el de azerus pero no me funcionan podrian ayudarme?

Eh intentado con este y registrar los Eventos pero no logro que funcione D:
bossTeleportLogin
bossTeleportKill

Hola @marcuz ,

En el foro ya se dispone de un Script, dentro del RevScript Dungeon, ( si no es fácil para encontrarlo ahora mismo haré un tema aparte )

El script que quieres aquí lo tienes:


Aquí esta el tema del dungeon system, que lo que hace es crear un sistema de dung, con bosses customs que aparecen, al matarlos aparece un Teleport que te lleva a X sitio, tienes X segundos para cogerlo.

 
Last edited:
Hola Alex,

Eh intentado usar el script en la parte donde dice

player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Welcome to " .. SERVER_NAME .. " Server.!")

player:registerEvent("ffirstMonsterDungeon")
player:registerEvent("fsecondMonsterDungeon")
player:registerEvent("fthirdMonsterDungeon")
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Welcome!")
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, string.format("Your last visit in server: %s.", os.date("%d. %b %Y %X", player:getLastLoginSaved())))

Y en mi login_event
registrar el evento como? tpkillboss o todos deben ser registrado en mi login event?

intente agregarlo de esa manera pero no me funciono
 
Hola Alex,





intente agregarlo de esa manera pero no me funciono

Perdona, actualicé el tema, ahora lo tienes corregido, el ultimo apartado el parrafo:


Debería de quedarte así, si solamente incorporas 1 solo script, como el del ejemplo , con el nombre tpkillboss

player:registerEvent("tpkillboss")
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Welcome to " .. SERVER_NAME .. " Server.!")

Ahora, si por ejemplo vas a crear 2 mas, el segundo se llamara tpkillbosssecond y el tercero tpkillbossthird, entonces quedaria en el login.php:


player:registerEvent("tpkillboss")
player:registerEvent("tpkillbosssecond")
player:registerEvent("tpkillbossthird")
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Welcome to " .. SERVER_NAME .. " Server.!")
 
Solution
Hola Alex Perdon se que te moleste se que estas ocupado de casualidad tendras un script de algun item que remueva todas las frags mediante un item para una version 12.64 - 12.72

Tengo este pero solo es para remover 1 sola skull

Si eres red o black


local removeSkull = Action()

function removeSkull.onUse(player, item, fromPosition, target, toPosition, isHotkey)


--local tile = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)
--if not tile then
--player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be in protection zone to use this item.")
--return true
--end
if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
player:setSkull(SKULL_NONE)
player:setSkullTime(0)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName()))
item:remove(1)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end



return true
end

removeSkull:id(24317) ----------------cambia id del objeto que va utilizar
removeSkull:register()
 
Ese tipo de script no, pero ahora me ando preguntando,
No Funcionaria si supieras el nombre de las demás skulls ? ' White_Skull ' Etc .. ?
Y añadirlo en
if isInArray({SKULL_RED,SKULL_BLACK,SKULL_WHITE}

Ni idea, habría que ver como se comenta en la base de datos las diferentes skulls y en este caso quizás añadirlo y ver si funciona.
 
con ese script si tengo el nombre de las demas skull solo seria añadirlas? y le quitaria todas las frags o seguiria siendo solo 1?

Por lo que entiendo:
db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName()))

Dice set 0 Unjustified, en donde encuentras 1, entonces, seria ponerle el numero 2, para quitar 2 Skulls, si lo entiendo bien.
No soy de mucho script pero yo lo entendería de esta forma.
 

Tibia Server Lists

#1 FEATURED US Ultron OT 1,503 / 5,000Online EXPStages PROTO8.6 ENGINEUltron OT RANK PTS5.9 +100% VOTES0 #2 FEATURED US Nefera 167 / 0Online EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.1 +100% VOTES0 #3 FEATURED ES Deixis 1 / 0Online EXPStages PROTO1098 ENGINETFS RANK PTS3.7 +100% VOTES1 #4 FEATURED ES Maeli 10 / 150Online EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.7 +100% VOTES0 #5 MX Marlboro War 30 / 300Online EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -33% VOTES0 #6 BR Tibinha YurOts 18 / 150Online EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.2 -14% VOTES0 #7 US Halera 2 / 0Online EXPStages PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.9 -83% VOTES0 #8 BR Exordion Legacy 52 / 2,000Online EXPx2 PROTO7.72 ENGINEExordion RANK PTS4.9 +100% VOTES0 #9 PL Lubelski 5 / 1,000Online EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.6 -15% VOTES0 #10 DE DBU Online 0 / 400Online EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS4.3 +100% VOTES0 #11 PL ReWar 0 / 2,000Online EXPcustom PROTO8.6 ENGINEOther RANK PTS4.3 0% VOTES0 #12 PL Velesta 0 / 1,000Offline EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.3 -99% VOTES0 #13 ES JustRL FreeTC 1530 24 / 250Online EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS4.3 +100% VOTES0 #14 ES Farlia Global 2026 0 / 333Offline EXPx5 PROTO15.25 ENGINEFarliaServ 1.525 RANK PTS3.9 -22% VOTES0 #15 SE MortalisOT Custom 0 / 500Offline EXP100x -1.2x PROTO10.98 ENGINEMortalisOT V1 RANK PTS3.8 +100% VOTES0 #16 US Rommania 0 / 500Online EXPstages, x10 PROTO7.4 ENGINETFS 0.4 RANK PTS3.6 +100% VOTES0 #17 US BerethaOnline 1 / 2,000Online EXPStages PROTO10.98 ENGINETFS RANK PTS3.5 +100% VOTES0
Top