Jump to content
  • 0
Sign in to follow this  
fiction

Q> rentitem with random option

Question

Hi,

 in Herc, exist any method to use rentitem with random option system?.

For example, in rathena exist rentitem3, where i can use the flag RandomIDarray, RandomValueArray, etc

*rentitem3 <item id>,<time>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account_id>};

 

Greetings!.-

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

the answer is no

we only have *setequipoption currently, which has to equip the item to make it effective <-- kinda useless

prontera,161,185,5	script	asda2sdad	1_F_MARIA,{
	rentitem Knife, 60;
	equip Knife;
	setequipoption EQI_HAND_R, 1, VAR_STRAMOUNT, 50;
	end;
}

 

Share this post


Link to post
Share on other sites
  • 0

oh.. what a pity.

Thank you Annie

Well if something is searching for something like rentitem for specific job, a workaround that i did, is this:

	.@eac = eaclass();
	if ((.@eac&EAJ_BASEMASK) == EAJ_SWORDMAN){
		rentitem 1117,86400;
		equip 1117;
		setequipoption EQI_HAND_L, 1, .@OptID, .@OptVal;
			}
	if ((.@eac&EAJ_BASEMASK) == EAJ_MAGE){
		rentitem 1619,86400;
		equip 1619;
		setequipoption EQI_HAND_R, 1, .@OptID, .@OptVal;
				}
	if ((.@eac&EAJ_BASEMASK) == EAJ_ARCHER){
		rentitem 1705,86400;
		equip 1705;
		setequipoption EQI_HAND_R, 1, .@OptID, .@OptVal;
			}

	if ((.@eac&EAJ_BASEMASK) == EAJ_ACOLYTE){
		rentitem 1601,86400;
		equip 1601;
		setequipoption EQI_HAND_R, 1, .@OptID, .@OptVal;
			}

 

Edited by fiction

Share this post


Link to post
Share on other sites
  • 0

hmm ... I thought you are using some unique/custom item ID ...
but if you are using normal items, then if the player already having ... katana for example, the equip script command might equip the wrong item

for the time being, perhaps using getinventorylistidx could solve this potential problem ... until we have those script commands

prontera,158,185,5	script	asdasdad	1_F_MARIA,{
	rentitem Knife, 60;
	.@renttime = gettimetick(2) + 60;
	getinventorylistidx;
	.@inventorysize = getInventorySize();
	for ( .@i = 0; .@i < .@inventorysize; ++.@i ) {
		if ( @inventorylistidx_id[.@i] == Knife && @inventorylistidx_expire[.@i] == .@renttime ) {
				equipidx .@i;
				break;
		}
	}
	setequipoption EQI_HAND_R, 1, VAR_STRAMOUNT, 50;
	end;
}

 

well ... that's the problem when we still don't have complete list of script commands ...yet

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
Sign in to follow this  

×
×
  • Create New...

Important Information

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