Jump to content
  • 0

Is there a way to write script get item like OnPartyKilledEvent just like OnNPCKillEvent ?


Alexandrite

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

here it's my script, but this script is work as individual and work as the last killed

function	script	get_special_item	{
	set .@item_id, getarg(0);
	set .@chance, getarg(1);
	set .@rand, rand(1, 10000);

	if(getstatus( SC_ITEMBOOST, 0 )){
		.@chance = .@chance*2;
	}

	if(.@rand <= .@chance) {
		getitem .@item_id, 1;
	}

	//dispbottom .@rand+"/"+.@chance;

	return;
}

 

// Number Format
//============================================================ 
function	script	number_format	{
	set .@str$, getarg(0);

	for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
		set .@str$, insertchar(.@str$,",",.@i);

	return .@str$;
}

 

OnNPCKillEvent:
	// 2 : Mob Name , 3 : Mob Lv
	//announce "OnNPCKillEvent : "+ strmobinfo(2, killedrid),bc_all,0xFFFF00;
	//announce "OnNPCKillEvent : "+ strmobinfo(3, killedrid),bc_all,0xFFFF00;
	//announce "OnNPCKillEvent : "+ JobLevel,bc_all,0xFFFF00;

	//.@Point = rand(BaseLevel/2, BaseLevel)+rand(JobLevel/2, JobLevel)+(rand(strmobinfo(3, killedrid)/2, strmobinfo(3, killedrid)));
	.@Point = 1+rand((strmobinfo(3, killedrid)/2), strmobinfo(3, killedrid)) + rand(strmobinfo(7, killedrid)/5, strmobinfo(7, killedrid)/(9/2));
	.@Point$ = callfunc("number_format", .@Point);

	#CASHPOINTS = #CASHPOINTS+.@Point;

	dispbottom "ได้รับ "+.@Point$+" พอยท์ คงเหลือ "+callfunc("number_format", #CASHPOINTS)+" พอยท์";

	//for(.@i=0, .@i<10000; .@i++){

	callfunc("get_special_item", 14533, 1);	// Battle Manual
	callfunc("get_special_item", 14592, 1);	// Job Battle Manual
	callfunc("get_special_item", 12210, 1);	// Bubble Gum
	callfunc("get_special_item", 12209, 1);	// Life Insurance
	
	callfunc("get_special_item", 12075, 1);	// STR+10 Food
	callfunc("get_special_item", 12090, 1);	// AGI+10 Food
	callfunc("get_special_item", 12085, 1);	// VIT+10 Food
	callfunc("get_special_item", 12080, 1);	// INT+10 Food
	callfunc("get_special_item", 12095, 1);	// DEX+10 Food
	callfunc("get_special_item", 12100, 1);	// LUK+10 Food

	callfunc("get_special_item", 12122, 1);	// HIT Food
	callfunc("get_special_item", 12123, 1);	// FLEE Food
	callfunc("get_special_item", 12124, 1);	// ATK Food

	callfunc("get_special_item", 984, 1);	// Oridecon
	callfunc("get_special_item", 985, 1);	// Elunium

	//	sleep2 1;

	//}

	end;

But I would like it's work like a party loop or something

 

I mean assume I just kill 1 monster then let OnNPCKillEvent just work but the script just check if I in party or not and if yes let make this script loop and work for the whole party

or what i mean i would like everyone in party have the same chance of getting special item drop by doesn't care who's the one that killed monster, no matter who kill, whole party get the same chance

is it possible ? from my opinion i think it's possible but i don't know how to make script it work > <"

Edited by Alexandrite
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

I think this script should give you an idea how to do that:

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  896
  • Reputation:   118
  • Joined:  05/23/12
  • Last Seen:  

Use the party options Ragnarok have.

 

Rynbef~

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...