35 posts in this topic

I don't really see why you have to add the property.

in_process 

Since you turn it back to false in the same execution context/if block. Thanks btw!

Edited by Valiente

Share this post


Link to post
Share on other sites

I don't really see why you have to add the property.

in_process 

Since you turn it back to false in the same execution context/if block. Thanks btw!

int pc_takeitem_pre(struct map_session_data **sd_, struct flooritem_data **fitem_)
{
	struct area_p_data *data;
	struct map_session_data *sd = *sd_;
	struct flooritem_data *fitem = *fitem_;
	data = adb_search(sd);
	if (data->arealoot && data->in_process==false) {
		data->in_process = true;
		map->foreachinrange(skill->greed, &fitem->bl, arealoot_range, BL_ITEM, &sd->bl);
		hookStop();
		data->in_process = false;
		return 1;
	}
	return 1;
}

in_process is used in pc_takeitem preHook,

if you see in_process is set to true and it invokes skill->greed, skill->greed also invokes pc_takeitem, which would make it into possibility of infinite loop.

so to prevent this, I set in_process to true, so that the nested calls won't be executing foreachinrange(see if condition, it checks if in_process is false).

Share this post


Link to post
Share on other sites

Where I can see the complete guide to install this plugin?

I never had added a plugin before...

 

:/

Share this post


Link to post
Share on other sites

Try ask or rathena forum? At herc forum this is bit offtopic

 

Share this post


Link to post
Share on other sites
13 hours ago, HD Scripts said:

Someboy teachs me to implement this src on rathena? no plugins

It's better to ask this kind of thing at rA forum itself. If there's something which is common to both emulator, you can ask it anywhere, but since your request is rA specific, just ask there (and I am sure there already might be topic for this)

Share this post


Link to post
Share on other sites
12 hours ago, HD Scripts said:

I'm use Hercules now... But, i can implement this src command? No plugins, command.

Sorry, I won't do that(it needs to be updated too frequently), but it's easy to see plugin code(pre/post hook) and change to src 

Share this post


Link to post
Share on other sites

I have successfully installed the plugin. But when I use @arealoot, it says that @arealoot is Unknown Command.

 

Update: @arealoot command is working now. But its still only getting 1 item. instead of 3x3 area items.

Edited by KhnKhymKh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now