The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help script Mago do Portal
Author Message
victorstelzer
Journeyman
*

Posts: 80
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #1
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.)
11-27-2012 08:47 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #2
RE: Help script Mago do Portal
when it comes to accepting which dungeon to teleport to:
Code:
if (<findlayer.29.restest i_gold> >= 500)
  local.amount=500
  forcont <findlayer.29>
    if (<amount> > 500)
      amount -= 500
      local.amount -= 500
    else
      local.amount -= <amount>
      remove
    endif
  endfor
  //teleport
elseif (<findlayer.21.restest i_gold> >= 500)
  findlayer.21.consume 500 i_gold
  //teleport
else
  sysmessage You can not afford to do that.
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
11-28-2012 10:44 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)