Jump to content
Oxxy

Ressurrection item

Recommended Posts

Description:

 

    Possibility to ressurrect yourself by having item in your backpack.    © 2015, Oxxy, v1.0

 


Changelog:

    v1.0 Initial release


Syntax:

 

callfunc "Ressurrection_Item",<1:0>,<item_id>,<item_amount>,<1:0>;

 

Refer to this, while you're using this function:

 

    First argument: enable(1) or disable(0) ressurrection item function?    Second argument: <item_id> of item, that is used for ressurrection    Third argument: <item_amount> of item, that is used for ressurrection    Fourth argument: enable(1) or disable(0) deletion of the item after ressurection?

 

Ressurrection_Item1.0.txt

Edited by Oxxy

Share this post


Link to post
Share on other sites

idk what for I created this, but feel free to use, it allows you to put this function inside the bonus of item so it will be used to ressurect yourself.

syntax is:

 

CallFunc("ResItem", <itemID>, <itemAmount>, <1:0>); 
 

 

function	script	ResItem	{	set .@resItemEnabled, 1; // Res item enabled.    set .@itemID, getarg(0); // Item ID used for ressurection    set .@itemIDa, getarg(1); // Item amount used for ressurection    set .@delitem, getarg(2); // Delete item after ressurection? 1 = yes, 0 = no	    OnPCDieEvent:	if(killedrid == getcharid(0) && .@resItemEnabled) {		if(countitem(.@itemID) >= .@itemIDa) {			if(.@delitem)				delitem .@itemID, .@itemIDa;							atcommand "@alive";		} else end;	}} 
Correct me if I am wrong, but I think OnPCDieEvent won't work inside function.

Share this post


Link to post
Share on other sites

 

idk what for I created this, but feel free to use, it allows you to put this function inside the bonus of item so it will be used to ressurect yourself.

syntax is:

CallFunc("ResItem", <itemID>, <itemAmount>, <1:0>); 
 

 

function	script	ResItem	{	set .@resItemEnabled, 1; // Res item enabled.    set .@itemID, getarg(0); // Item ID used for ressurection    set .@itemIDa, getarg(1); // Item amount used for ressurection    set .@delitem, getarg(2); // Delete item after ressurection? 1 = yes, 0 = no	    OnPCDieEvent:	if(killedrid == getcharid(0) && .@resItemEnabled) {		if(countitem(.@itemID) >= .@itemIDa) {			if(.@delitem)				delitem .@itemID, .@itemIDa;							atcommand "@alive";		} else end;	}} 
Correct me if I am wrong, but I think OnPCDieEvent won't work inside function.

Not sure about it, I've created that back in 2012?~

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.