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-nmm6 (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-nmm6 (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-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RES EVENT
Author Message
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #1
RES EVENT
im having trouble getting this event to res you after the timer. not too sure hat i did wrong. ive been reading spherewiki and couldnt see anything.

[PLEVEL 1]
res

[FUNCTION RES]
IF <SRC.TAG.RES>=1>>
src.findid.i_res_delay.remove
SRC.TAG.RES=0
SYSMESSAGE @079 You have changed your mind about Resurrecting!
RETURN 1
ELSE
IF ((<SRC.BODY>==c_ghost_man) ||(<SRC.BODY>==c_ghost_woman))
SRC.NEWITEM=i_res_delay
SRC.ACT.EQUIP
SRC.MESSAGE @0481 You Will Be Ressurected In 60 Seconds. Please Stay On Your Body!
ELSE
SRC.MESSAGE @0481 You Cannot Use This Command While Alive!
RETURN 1

[ITEMDEF i_res_delay]
DEFNAME=i_res_delay
ID=i_handr_1
NAME=Res Delay
TYPE=T_EQ_SCRIPT
LAYER=30
WEIGHT=0

ON=@CREATE
ATTR=attr_invis
MORE1=5

ON=@EQUIP
TIMER=1

ON=@Timer
if ( <cont> )
if ( <more1> )
cont.message @079 <EVAL(<more1>)>
more1=<more1>-1
TIMER=1
return 1
ENDIF
SRC.RESURRECT
src.sfx 01eb
src.spelleffect 06 1000
RETURN 1
01-23-2014 09:56 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: RES EVENT
The first IF in the REs function should be <src.tag.res> == 1

The else if check should be in the same line ( don't know if it was caused by the copy&paste)

Item created by newitem function should be referenced by NEW.blabla

Missing an endif after the final return 1 in Res Function

In @Timer endif is missing after the final return 1

Also tag.res is never set to 1 btw !

Hope it can helps !

Best regards,

Pietro
(This post was last modified: 01-23-2014 10:08 AM by darksun84.)
01-23-2014 10:06 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: RES EVENT
And you are mixing (default) with (src) in the function so if you type .xres ingame, the lines with SRC will be executed on you, as you are the source who is calling the function, instead of the player.

IF ((<SRC.BODY>==c_ghost_man) ||(<SRC.BODY>==c_ghost_woman)) -> IF (<FLAGS>&STATF_DEAD) // that will check for death status instead for an specific body values, so it will work for elfs and gargoyles too and with less checks.
SRC.NEWITEM -> SERV.NEWITEM
SRC.ACT.EQUIP -> EQUIP=<NEW>


ON=@Timer triggers doesn't have SRC, as the src would be the server itself calling the timer to expire out, if you want to refer to the player holding it you should use CONT and change a few SRC you have there.

Also, and very important, you must use REMOVE on the item after resurrecting the player or you will have a problem with tons of items on each player.
01-23-2014 06:08 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: RES EVENT
Cont.resurrect

Sent from my GT-I9505 using Tapatalk

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
01-23-2014 10:23 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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