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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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