Código:
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[defname moongate_locations]
moongate_location_1 1635,1563,25,0 //Britain
moongate_location_2 2675,2155,1,0 //Bucaneer's den
moongate_location_3 2228,1214,1,0 //Cove
moongate_location_4 1122,3612,1,0 //Jhelom
moongate_location_5 2492,377,0 //Minoc
moongate_location_6 4438,1058,0 //Moonglow
moongate_location_7 3659,1220,22,0 //Nujel'm
moongate_location_8 2887,3415,37,0 //Serpents hold
moongate_location_9 619,2115,2,0 //Skara brae
moongate_location_10 1805,2711,20,0 //Trinsic
moongate_location_11 629,851,0 //Yew
moongate_location_12 2923,667,42,0 //Vesper
moongate_location_13 3726,2224,51,0 //Magincia
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[function poner_puertaslunares]
local.gate=1
While (<def0.moongate_location_<dlocal.gate>>)
serv.newitem i_moongate
new.p=<def0.moongate_location_<dlocal.gate>>
new.tag0.gate=<dlocal.gate>
new.update
local.gate += 1
endwhile
local.gate -= 1
src.smsg <dlocal.gate> puertas lunares puestas.
[function quitar_puertaslunares]
Foritems 6144
If (<baseid>==i_moongate)
remove
local.gate += 1
endif
endfor
src.smsg <dlocal.gate> puertas lunares eliminadas.
[function f_moongate_getflag]
local.dblme=1
For 1 <eval <args>-1>
local.dblme *= 2
endfor
//serv.log <hval <qval (<args>==1) ? 1:<dlocal.dblme>>>
return <hval <qval (<args>==1) ? 1:<dlocal.dblme>>>
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[itemdef i_moongate]
id=i_moongate_blue
NAME=Puerta Lunar
type=t_normal
on=@create
attr=04010
color=0042c
on=@step
trigger @dclick
travel_cost 1000
return 1
on=@dclick
src.tag0.moongates |= <f_moongate_getflag <tag0.gate>>
If (<distance> > 2)
src.sysmessage Estas demasiado lejos.
elif (<src.findid.i_mem_moongatedelay>)
src.sysmessageua 55 0 0 1 Seras teletransportado en <src.findid.i_mem_moongatedelay.timer> segundos.
elif (<src.hits> < <src.str>)&&(<src.tag0.pk>==1)&&(!<src.flags>&statf_dead)&&(!<src.isgm>)
src.sysmessageua 022 0 0 1 Necesitas estar curado para poder usarlo!
else
sdialog d_moongate_portal
endif
return 1
CATEGORY=Shamino
SUBSECTION=Viajes
DESCRIPTION=Puertas Lunares
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[ITEMDEF i_mem_moongatedelay]
name=Temporizador Moongate
id=i_memory
type=t_eq_script
on=@timer
If (<link.distance <cont.uid>> < 4)
cont.go <tag0.p>
cont.move s
cont.sysmessageua 055 0 0 1 Usas la Puerta Lunar a <cont.region.name>!
else
cont.sysmessageua 022 0 0 1 Viaje Cancelado! Estas demasiado lejos del portal.
endif
cont.events -e_moongate_cancel
remove
return 1
CATEGORY=Shamino
SUBSECTION=Viajes
DESCTIPTION=Puerta Lunar Memoria
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[dialog d_moongate_portal]
80,0
resizepic 0 0 3600 410 430
resizepic 10 10 2620 390 410
gumppic 14 35 01598 //0824
dtext 100 15 0052 Puertas Lunares del Reino
dtext 130 185 <qval (<src.tag0.moongates>&<f_moongate_getflag 1>) ? 1152:022> Britain
button 115 188 1210 1209 1 0 1
dtext 190 220 <qval (<src.tag0.moongates>&<f_moongate_getflag 2>) ? 1152:022> Bucaneer's den
button 220 240 1210 1209 1 0 2
dtext 190 150 <qval (<src.tag0.moongates>&<f_moongate_getflag 3>) ? 1152:022> Cove
button 175 153 1210 1209 1 0 3
dtext 135 380 <qval (<src.tag0.moongates>&<f_moongate_getflag 5>) ? 1152:022> Jhelom
button 120 383 1210 1209 1 0 4
dtext 225 100 <qval (<src.tag0.moongates>&<f_moongate_getflag 6>) ? 1152:022> Minoc
button 210 103 1210 1209 1 0 5
dtext 330 160 <qval (<src.tag0.moongates>&<f_moongate_getflag 7>) ? 1152:022> Moonglow
button 350 150 1210 1209 1 0 6
dtext 265 165 <qval (<src.tag0.moongates>&<f_moongate_getflag 8>) ? 1152:022> Nujel'm
button 290 150 1210 1209 1 0 7
dtext 200 338 <qval (<src.tag0.moongates>&<f_moongate_getflag 9>) ? 1152:022> Serpents hold
button 235 358 1210 1209 1 0 8
dtext 20 215 <qval (<src.tag0.moongates>&<f_moongate_getflag 10>) ? 1152:022> Skara brae
button 50 235 1210 1209 1 0 9
dtext 160 295 <qval (<src.tag0.moongates>&<f_moongate_getflag 11>) ? 1152:022> Trinsic
button 145 298 1210 1209 1 0 10
dtext 95 110 <qval (<src.tag0.moongates>&<f_moongate_getflag 12>) ? 1152:022> Yew
button 80 113 1210 1209 1 0 11
dtext 228 130 <qval (<src.tag0.moongates>&<f_moongate_getflag 12>) ? 1152:022> Vesper
button 215 135 1210 1209 1 0 12
dtext 305 230 <qval (<src.tag0.moongates>&<f_moongate_getflag 14>) ? 1152:022> Magincia
button 290 233 1210 1209 1 0 13
dtext 31 395 1152 Salir
button 16 398 1209 1210 1 0 0
[dialog d_moongate_portal button]
onbutton=0
onbutton=1,200
serv.newitem i_mem_moongatedelay
new.cont=<src.uid>
new.link=<uid>
new.tag.p=<def0.moongate_location_<argn>>
new.timerd=<qval (<src.isgm>) ? 1:40>
src.events +e_moongate_cancel
endif
return 1
//&&&&&&&&&&&&&0&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
[EVENTS e_moongate_cancel]
on=@gethit
sysmessageua 022 0 0 1 El portal se desestabiliza y el viaje se cancela.
findid.i_mem_moongatedelay.remove
events -e_moongate_cancel
return 0
on=@hittry
sysmessageua 022 0 0 1 El portal se desestabiliza y el viaje se cancela.
findid.i_mem_moongatedelay.remove
events -e_moongate_cancel
return 0
on=@spellcast
sysmessageua 022 0 0 1 El portal se desestabiliza y el viaje se cancela.
findid.i_mem_moongatedelay.remove
events -e_moongate_cancel
return 0
on=@skilluse
sysmessageua 022 0 0 1 El portal se desestabiliza y el viaje se cancela.
findid.i_mem_moongatedelay.remove
events -e_moongate_cancel
return 0
on=@USERWARMODE
sysmessageua 022 0 0 1 El portal se desestabiliza y el viaje se cancela.
findid.i_mem_moongatedelay.remove
events -e_moongate_cancel
return 0
//####################################################
// KNOCKBACK
//####################################################
[function knockback]
serv.newitem i_gold
new.attr=090
new.p=<p>
doswitch <dir>
new.move 0,1
new.move -1,1
new.move -1,0
new.move -1,-1
new.move 0,-1
new.move 1,-1
new.move 1,0
new.move 1,1
enddo
new.morez=<z>
new.fix
local.allow=<qval (<argn>) ? 5:3>
If (<new.morez>==<new.z>)||(<eval ((<new.morez>-<new.z>)*(<new.morez>-<new.z>))> <= <dlocal.allow>)
p=<new.p>
update
endif
new.remove
[eof]