Jump to content
  • 0

Everyone gets Item when instance is finish.


aferny

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  20
  • Reputation:   0
  • Joined:  09/28/20
  • Last Seen:  

Im really new a scripting. But could someone give me a script on when we finish an instance everyone in the party gets an item? I tried looking for it and none of them seems to work.

 

Thank you in advance!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

	for(.@i=0;.@i<getarraysize(.aid);.@i++){
		getitem 7227,1,.aid[.@i]; // 7227, 1 pcs
	}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

ok I take this chance to relearn how to make rathena custom instance script
this is previous topic ->

the very first thing I noticed is ... this YAML format .... I hate it so much

[Error]: Failed to read INSTANCE_DB database file from 'db/import/instance_db.yml'.
[Error]: end of sequence not found (Line 43: Column 4)

to fix this issue, you have to add an extra line before the Body:

Header:
  Type: INSTANCE_DB
  Version: 1


Body:
  - Id: 34
    Name: Test Instance
    TimeLimit: 3600
    IdleTimeOut: 15
    Enter:
        Map: guild_vs2
        X: 49
        Y: 49

WHat The F***

-------------------------------------------------------------------------------------

2nd, IM_CHAR doesn't work .....

another WHAT the F***

EDIT: it seems only IM_PARTY works currently, all other types are broken

--------------------------------------------------------------------------------

ok anyway this topic ask for a party, IM_PARTY works at least .... fuh .....

prontera,155,180,0	script	Test Instance	1_F_MARIA,{
//	dispbottom "- "+ instance_mapname("guild_vs2") +" + "+ instance_id(IM_PARTY);
	select "Create Instance", "Instance Enter";
	if (@menu == 1) {
		if (instance_create("Test Instance", IM_PARTY) < 0) {
			mes "failed to create instance";
			close;
		}
		mes "Instance create successful";
		close;
	}
	if (!instance_id(IM_PARTY)) {
		mes "instance not create yet";
		close;
	}
	instance_enter "Test Instance";
	end;
}
guild_vs2,49,49,5	script	test dialog	1_F_MARIA,{
	dispbottom strnpcinfo(4);
	mes sprintf("%d monsters on this map", 'amount);
	next;
	select "Destroy";
	instance_destroy;
	end;
OnInstanceInit:
	monster instance_mapname("guild_vs2"), 49,49, "--ja--", 1002, 10, instance_npcname(strnpcinfo(0))+"::OnMobDead";
	'amount = 10;
	end;
OnMobDead:
	--'amount;
	if ( !'amount ) {
		instance_announce 0, "all monster killed", bc_map;
		.@party_id = instance_live_info(ILI_OWNER);
		getpartymember .@party_id, 1;
		getpartymember .@party_id, 2;
		for (.@i = 0; .@i < $@partymembercount; ++.@i) {
			if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i]))
				getitem 512, 1, $@partymemberaid;
		}
		sleep 2000;
		instance_destroy;
	}
	end;
}

it seems *instance_mapname can no longer be use to check which instance ID they are in
but *instance_id is now fixed for rathena, not so bad

time to update my blog

Edited by AnnieRuru
Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...