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
duel pit fails
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: duel pit fails
Try this:

PHP Code:
[PLEVEL 4]
DUELPIT

[FUNCTION DUELPIT]
IF (<VAR.
DuelPitRunning>)
   
SRC.SYSMESSAGE You cannot start a new duel event till the previous one is finished
   
RETURN 1
ENDIF
SERV.@0466 Se han creado las piedras para el Duel Pit!

SERV.NEWITEM=i_duel_control
VAR.DuelPitRunning=<NEW>  // Set a global variable with the control stone's UID
NEW.P=<SRC.P>    // Put the control stone at the GM's feet
NEW.LINK=<SRC>  // Link the control stone to the GM
NEW.MORE=10       // This is the number of minutes for the countdown
NEW.TIMER=1        // Start the countdown timer

//Create all the entrance stones at each bank (link them to the control stone)...
SERV.NEWITEM=i_duel_entrance
NEW.P1431,1695,0,//BRIT
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P2504,562,0,0  //MINOC
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P4472,1178,0,//MOONGLOW
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P2234,1198,0,//COVE
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P5674,3142,12,//PAPUA
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P2893,3475,15,//SERPENT'S HOLD
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P2723,2188,0,//BUCCANNER'S DEN
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P5222,185,5,0  //WIND
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P1324,3780,0,//JHELOM
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P3690,2522,0,//OCCLO
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P1822,2825,0,//TRINSIC
NEW.LINK=<VAR.DuelPitRunning>
SERV.NEWITEM=i_duel_entrance
NEW.P636,859,0,//YEW
NEW.LINK=<VAR.DuelPitRunning>

[
ITEMDEF i_duel_control]
ID=I_GRAVE_STONE
NAME
=DUEL PIT CONTROL
TYPE
=t_normal
CATEGORY
=Mayo
SUBSECTION
=Duel
DESCRIPTION
=Duel Pit Controller
ON
=@Create
   ATTR
=attr_move_never
   COLOR
=0480
ON
=@Timer
   
IF (<MORE>)
      
SERV.@0466 Quedan <EVAL <MORE>> minutos para que comience el Duel Pit.
      
MORE --             // subtract 1 from MORE
      
TIMER=60          // set the TIMER for 60 more seconds
   
ELSE
      
SERV.@0466 Duel Pit cerrado!.
      
//The timer is finished so find and remove all the duel event entrances:
      
FORINSTANCES i_duel_entrance
         REMOVE
      
ENDFOR
   ENDIF
   RETURN 
1
ON
=@Dclick
   
IF (<SRC.ISGM>)
      
// Code to cancel the duel event:
      
VAR.DuelPitRunning=
   ENDIF
   
REMOVE

[ITEMDEF i_duel_entrance]
ID=I_GRAVE_STONE
NAME
=Entrada DUEL PIT
TYPE
=t_normal
CATEGORY
=Mayo
SUBSECTION
=Duel
DESCRIPTION
=Piedra del Duel
ON
=@Create
   ATTR
=attr_move_never
   COLOR
=0480
ON
=@DClick
   SERV
.@0466 <SRC.NAME>entered the Duel Pit!
   
TAG.PlayerUID=<SRC>   // Store the Player's UID in a tag
   
SRC.GO 6074,449,-22     // Send the player to the Duel Area Start
   
SRC.EVENTS +E_DUEL    // Give the Player a duel event
   // Save the player's vital statistics:
   
SRC.TAG.OLDNAME=<SRC.NAME>
   
SRC.TAG.OLDCOLOR=<SRC.COLOR>
   
SRC.TAG.OLDKARMA=<SRC.KARMA>
   
SRC.TAG.OLDFAME=<SRC.FAME>
   
SRC.TAG.OLDKILLS=<SRC.KILLS>
   
SRC.NAME=<SRC.NAME>[DUEL PIT]

[
EVENTS E_DUEL]
ON=@Death
   SRC
.GO 6091,442,-22   //Send the player back to the duel start
   
SRC.HITS=<SRC.STR>
   RETURN 
1  //Prevent the player from actually dying 
(This post was last modified: 08-15-2012 06:38 AM by RanXerox.)
08-15-2012 06:32 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
duel pit fails - daedelus - 08-14-2012, 11:37 PM
RE: duel pit fails - RanXerox - 08-15-2012, 12:18 AM
RE: duel pit fails - daedelus - 08-15-2012, 12:46 AM
RE: duel pit fails - RanXerox - 08-15-2012 06:32 AM
RE: duel pit fails - daedelus - 08-15-2012, 08:24 AM

Forum Jump:


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