Jump to content

LiTo

Members
  • Content Count

    8
  • Joined

  • Last visited

Posts posted by LiTo


  1. guys patulong nman. 

     

    saan bah makikita ang revision number? kasi after ko ma run yung server eto ung nka lagay.

     

    Capture.jpg

     

     

    Thanks.


  2.  

     

    @mahlicot

    can i use it in pre-renwal server? because after adding the plugin, i am getting unknown command if i use @rentitem.

     

    What version you use? are you sure there is no error upon compiling? please review..

     

    yeah. there is no error during compiling. but its working now. I am really interested only in @rentitem. So what i did was i manually put the code below under atcommand.c.

     

    ACMD(rentitem){	char item_name[100];	int number = 0, item_id, flag = 0;	struct item item_tmp;	struct item_data *item_data;	int get_count;		memset(item_name, '0', sizeof(item_name));	if (!message || !*message || (		sscanf(message, ""%99[^"]" %d", item_name, &number) < 1 && 		sscanf(message, "%99s %d", item_name, &number) < 1 )) 		{ 		clif->message(fd, "Please enter an item name or ID (usage: @rentitem <item name/ID> <minutes>).");		return true;	}		if (number <= 0)		number = 1;		if ((item_data = itemdb->search_name(item_name)) == NULL &&	    (item_data = itemdb->exists(atoi(item_name))) == NULL)	{		clif->message(fd, "Invalid item ID or name.");		return false;	}	item_id = item_data->nameid;	get_count = number;	//Check if it's stackable.	if (itemdb->isstackable2(item_data)) {		clif->message(fd, "Cannot create rented stackable items.");		return false;	}	if(item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) {		clif->message(fd, "Cannot create rented pet eggs or pet armors.");		return false;	}		// if not pet egg		if (!pet->create_egg(sd, item_id)) {				number = get_count*60;				memset(&item_tmp, 0, sizeof(item_tmp));				item_tmp.nameid = item_id;				item_tmp.identify = 1;				item_tmp.expire_time = (unsigned int)(time(NULL) + number);				item_tmp.bound = 0;			if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_COMMAND)))				clif->additem(sd, 0, 0, flag);		}		if (flag == 0)		clif->message(fd, "Item created.");	return true;}

     

    thank you for sharing this tol. asitg! :D

     

    btw. im am using version 3.0.7.

×
×
  • Create New...

Important Information

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