Help script Mago do Portal
how do I charge 500 gp to go to the chosen city?
TAG.DUNGEON_1=Britain (500 Gp)
TAG.DUNGEON_1_P=1422 1695
TAG.DUNGEON_2=Minoc
TAG.DUNGEON_2_P=2472 540
TAG.DUNGEON_3=Vesper
TAG.DUNGEON_3_P=2895 681
TAG.DUNGEON_4=Cove
TAG.DUNGEON_4_P=2252 1193 -2
TAG.DUNGEON_5=Trinsic
TAG.DUNGEON_5_P=1868 2782
TAG.DUNGEON_6=Yew
TAG.DUNGEON_6_P=541 998
TAG.DUNGEON_7=Magincia
TAG.DUNGEON_7_P=3714 2220 20
TAG.DUNGEON_8=Moonglow
TAG.DUNGEON_8_P=4448 1099 0
TAG.DUNGEON_9=NewBie Area
TAG.DUNGEON_9_P=4526 1378 23,1
ON=@CREATE
COLOR=colors_skin
STR=100
DEX=0
INT=100
MAXHITS=5000
ITEMNEWBIE=i_robe_healing
COLOR=00955
ON=@CLICK
MESSAGE @036,,1 Mago do Portal
ON=@DCLICK
SRC.CTAG.MAPNUMC=1
DIALOG d_map_teleport 4
//SDIALOG d_vendor_buysell_new
RETURN 1
[FUNCTION PORTAL_MAGE]
IF <RESTEST i_portalmage_teleport>
IF <FINDID.i_portalmage_teleport.TIMER><=-1
FINDID.i_portalmage_teleport.REMOVE
ENDIF
ENDIF
IF !<RESTEST i_portalmage_teleport>
SERV.NEWITEM=i_portalmage_teleport
NEW.TAG.GO=<ARGV[0]>
EQUIP <NEW.UID>
ELSE
SYSMESSAGE @88,,1 You are already Portaling...
ENDIF
[ITEMDEF i_portalmage_teleport]
ID=i_memory
TYPE=t_eq_script
NAME=Portal Item
ON=@EQUIP
MORE=10
TIMER=1
SRC.SAY @88,,1 Teleportar
TAG.X=<CONT.P.X>
TAG.Y=<CONT.P.Y>
CONT.EVENTS +e_teleporting_c
ON=@TIMER
CONT.EVENTS -e_teleporting_c
IF <MORE><=0
CONT.GO <TAG.GO>
CONT.EVENTS -e_teleporting_c
CONT.SYSMESSAGE @88,,1 Voce foi teleportado ...
REMOVE
RETURN 1
ELSE
CONT.SAY @88,,1 [<EVAL <MORE>>]
MORE=<MORE>+-1
CONT.EFFECT 3,i_fx_sparkle,30,32,0,55,4
CONT.SOUND snd_spell_recall
TIMER=1
ENDIF
RETURN 1
[EVENTS e_teleporting_c]
ON=@GETHIT
IF <RESTEST i_portalmage_teleport>
SAY @88,,1 [Voce parou de teleportar: You got hit]
FINDID.i_portalmage_teleport.remove
ENDIF
EVENTS -e_teleporting_c
[dialog d_map_teleport]
0,0
MOVE
resizepic 0 0 5120 380 430
text 140 25 44 0
button 20 395 2152 2151 1 0 15
text 50 400 66 1
button 40 70 2152 2151 1 0 11
dtext 70 75 44 Cidades
VAR.DOWN=130
FOR <EVAL <SRC.CTAG.MAPNUMC>> <EVAL <SRC.CTAG.MAPNUMC>+10>
IF !STRMATCH(<TAG.DUNGEON_<EVAL <LOCAL._for>>>,)
button 20 <EVAL <VAR.DOWN>+5> 2361 2360 1 0 <EVAL <LOCAL._for>+1000>
dtext 35 <EVAL <VAR.DOWN>> 66 <TAG.DUNGEON_<EVAL <LOCAL._for>>>
VAR.DOWN=<EVAL <VAR.DOWN>+20>
ENDIF
ENDFOR
VAR.DOWN=
PAGE 2
button 140 370 2152 2151 1 0 7
button 350 370 2152 2151 1 0 3
VAR.DOWN=130
FOR <EVAL <SRC.CTAG.MAPNUMC>> <EVAL <SRC.CTAG.MAPNUMC>+10>
IF !STRMATCH(<TAG.TOWN_<EVAL <LOCAL._for>>>,)
button 20 <EVAL <VAR.DOWN>+5> 2361 2360 1 0 <EVAL <LOCAL._for>+4000>
dtext 35 <EVAL <VAR.DOWN>> 66 <TAG.TOWN_<EVAL <LOCAL._for>>>
VAR.DOWN=<EVAL <VAR.DOWN>+20>
ENDIF
ENDFOR
VAR.DOWN=
PAGE 3
button 140 370 2152 2151 1 0 6
button 350 370 2152 2151 1 0 4
VAR.DOWN=130
FOR <EVAL <SRC.CTAG.MAPNUMC>> <EVAL <SRC.CTAG.MAPNUMC>+10>
IF !STRMATCH(<TAG.OTHER_<EVAL <LOCAL._for>>>,)
button 20 <EVAL <VAR.DOWN>+5> 2361 2360 1 0 <EVAL <LOCAL._for>+7000>
dtext 35 <EVAL <VAR.DOWN>> 66 <TAG.OTHER_<EVAL <LOCAL._for>>>
VAR.DOWN=<EVAL <VAR.DOWN>+20>
ENDIF
ENDFOR
VAR.DOWN=
PAGE 4
[dialog d_map_teleport text]
Aonde voce desaja ir ?
Fechar
[dialog d_map_teleport button]
ON=0
dialogclose d_map_teleport
ON=11
SRC.CTAG.MAPNUMC=1
DIALOG d_map_teleport 1
ON=12
SRC.CTAG.MAPNUMC=1
DIALOG d_map_teleport 2
ON=13
SRC.CTAG.MAPNUMC=1
DIALOG d_map_teleport 3
ON=1
IF !STRMATCH(<TAG.DUNGEON_<EVAL <SRC.CTAG.MAPNUMC>+11>>,)
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+11>
ENDIF
ON=3
IF !STRMATCH(<TAG.TOWN_<EVAL <SRC.CTAG.MAPNUMC>+11>>,)
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+11>
ENDIF
DIALOG d_map_teleport 2
ON=4
IF !STRMATCH(<TAG.OTHER_<EVAL <SRC.CTAG.MAPNUMC>+11>>,)
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+11>
ENDIF
DIALOG d_map_teleport 3
ON=2
IF 0<SRC.CTAG.MAPNUMC>>1
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+-11>
ENDIF
DIALOG d_map_teleport 1
ON=7
IF 0<SRC.CTAG.MAPNUMC>>1
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+-11>
ENDIF
DIALOG d_map_teleport 2
ON=6
IF 0<SRC.CTAG.MAPNUMC>>1
SRC.CTAG.MAPNUMC=<EVAL <SRC.CTAG.MAPNUMC>+-11>
ENDIF
DIALOG d_map_teleport 3
ON=1000 3000
IF !STRMATCH(<TAG.DUNGEON_<EVAL <ARGN1>+-1000>>,)
SRC.Sysmessage @77,,1 Destino: <TAG.DUNGEON_<EVAL <ARGN1>+-1000>>
SRC.PORTAL_MAGE <TAG.DUNGEON_<EVAL <ARGN1>+-1000>_P>
ENDIF
dialogclose d_map_teleport
return 1
ON=4000 6000
IF !STRMATCH(<TAG.TOWN_<EVAL <ARGN1>+-4000>>,)
SRC.Sysmessage @77,,1 Destination: <TAG.TOWN_<EVAL <ARGN1>+-4000>>
SRC.PORTAL_MAGE <TAG.TOWN_<EVAL <ARGN1>+-4000>_P>
ENDIF
dialogclose d_map_teleport
return 1
ON=7000 9000
IF !STRMATCH(<TAG.OTHER_<EVAL <ARGN1>+-7000>>,)
SRC.Sysmessage @77,,1 Destination: <TAG.OTHER_<EVAL <ARGN1>+-7000>>
SRC.PORTAL_MAGE <TAG.OTHER_<EVAL <ARGN1>+-7000>_P>
ENDIF
dialogclose d_map_teleport
return 1
ON=15
dialogclose d_map_teleport
(This post was last modified: 11-27-2012 08:49 AM by victorstelzer.)
|