[System] Revive Hero Sys
2 participantes
Página 1 de 1
[System] Revive Hero Sys
Introdução:
Sistema muito útil e bem elaborado que inicia uma contagem regressiva com tempo de ((Lv. * 5) + 5) e no término da contagem, revive o herói morto no centro da área inicial do jogador com a face virada para o centro do mapa.
Instalação:
Basta copiar o script contido no spoiler abaixo e colar em uma trigger custom text.
Leigos podem ter dificuldades em realizar ajustes neste script, mas a todo caso estarei a disposição.
Sistema muito útil e bem elaborado que inicia uma contagem regressiva com tempo de ((Lv. * 5) + 5) e no término da contagem, revive o herói morto no centro da área inicial do jogador com a face virada para o centro do mapa.
Instalação:
Basta copiar o script contido no spoiler abaixo e colar em uma trigger custom text.
Leigos podem ter dificuldades em realizar ajustes neste script, mas a todo caso estarei a disposição.
- Spoiler:
//******************************************
//*
//* Created by Pedro Fernandes
//* www.JassCraft.blogspot.com
//*
//******************************************
scope ReviveTimer initializer init
globals
private string timerTitle = "Revive Time:"
private trigger trgReviveTimer = CreateTrigger()
private integer id = 0
private constant rect entireMap = bj_mapInitialPlayableArea
endglobals
private function checkHero takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),ConvertUnitType(0)) and (not(IsUnitType(GetTriggerUnit(),ConvertUnitType(19))))
endfunction
private function exeReviveTimer takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local location l = GetStartLocationLoc(GetPlayerStartLocation(p))
local location l2 = Location(GetRectCenterX(entireMap),GetRectCenterY(entireMap))
local integer i = GetHeroLevel(u)*5+5
local timer t = CreateTimer()
local timerdialog d = CreateTimerDialog(t)
local real r = bj_RADTODEG*Atan2(GetLocationY(l2)-GetLocationY(l),GetLocationX(l2)-GetLocationX(l))
call TimerDialogSetTitle(d,timerTitle)
call TimerStart(t,I2R(i),false,null)
if GetLocalPlayer() == p then
call TimerDialogDisplay(d,true)
endif
call TriggerSleepAction(TimerGetRemaining(t))
call ReviveHeroLoc(u,l,true)
if GetLocalPlayer() == p then
call TimerDialogDisplay(d,false)
call PanCameraToTimed(GetLocationX(l),GetLocationY(l),.75)
call SetUnitFacing(u,r)
call ClearSelection()
call SelectUnit(u,true)
endif
call PauseTimer(t)
call DestroyTimer(t)
call DestroyTimerDialog(d)
call RemoveLocation(l2)
call RemoveLocation(l)
set r = 0.
set d = null
set t = null
set i = 0
set l2 = null
set l = null
set p = null
set u = null
endfunction
private function init takes nothing returns nothing
loop
call TriggerRegisterPlayerUnitEvent(trgReviveTimer,Player(id),EVENT_PLAYER_UNIT_DEATH,null)
set id = id + 1
exitwhen id == 12
endloop
call TriggerAddCondition(trgReviveTimer,Condition(function checkHero))
call TriggerAddAction(trgReviveTimer,function exeReviveTimer)
set id = 0
endfunction
endscope
Re: [System] Revive Hero Sys
Como faço para por respawn instantanio ? com um cooldown de 2 segundo pelo menos?
lidog- Número de Posts : 3
Data de inscrição : 06/03/2014
Reputação : 1 Pontos : 18610
Re: [System] Revive Hero Sys
Encontre a seguinte linha no código:
E altere para:
- Código:
local integer i = GetHeroLevel(u)*5+5
E altere para:
- Código:
local integer i = 2
Tópicos semelhantes
» [Duvida] Reviver hero
» [System][Spell]Invoker System Spell
» [System]WoW Hero Respawn System
» [System] Level Up Sys
» [Sistema] MUI SYSTEM
» [System][Spell]Invoker System Spell
» [System]WoW Hero Respawn System
» [System] Level Up Sys
» [Sistema] MUI SYSTEM
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|