Ressurrection item

Oxxy

New member
Messages
142
Points
0
Location
Estonia, Tallinn
Emulator
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

 

Attachments

Last edited by a moderator:
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:

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

Code:
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.
 
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>);  

Code:
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?~

 
Back
Top