llchrisll

Chris' Script Collection [Last Update: 06-10/2019]

Recommended Posts

=============== Update: 10/25-2018: Added 6 Scripts & formated the Topic a bit more ============

  • Split Topic into Sections (Released, Requests, Additional and Unofficial)
  • Added Instanced Loot System
  • Added every requested Script so far
  • Added Pagination function and GetMobData function
  • Added Unofficial Excellion Gear NPC's and Nightmare Bio Lab NPC's
  • Added Armor Enchanter
  • Fixed Card Compounder

Share this post


Link to post
Share on other sites

Hi Chris, i got an error in this script "mass seller"

i tried to put 1 curly brace at the end but it shows a new error. please help me to fix it. thank you.

missing 1 right curlys at file npc/custom/mass_seller.txt , line 144

 

prontera,150,180,4	script	Mass Seller	100,{
mes .n$;
mes "Welcome, "+strcharinfo(0)+"!";
mes "How can I help you?";
next;
switch(select("- Sell Items:- Personal Config:- Leave")) {
	case 1:
	mes .n$;
	if(!getarraysize(MS_Types)) {
		mes "If this is your first time using my service, I would recommend you setup your personal config before proceeding.";
		mes "Otherwise I will sell every Item in your Inventory, except Refined Equipment and Equipment with Cards.";
		mes " ";
	} else {
		mes "Here is the current list of your ignored items:";
			for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
				for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
					if(MS_Types[.@p] == .itemtypesid[.@q])
						mes " > "+.itemtypestxt$[.@q];

	next;
	if(select("- Continue:- Leave") - 1) close;
	getinventorylist;
	for ( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1) {
		set .@e,0;
		// Skip Equipment which is: Equipped, Refined and has Cards/Enchantments
		if(@inventorylist_equip[.@i] != 0) continue;
		if(@inventorylist_refine[.@i] != 0) continue;
		if(@inventorylist_card1[.@i] != 0) continue;
		if(@inventorylist_card2[.@i] != 0) continue;
		if(@inventorylist_card3[.@i] != 0) continue;
		if(@inventorylist_card4[.@i] != 0) continue;
		for ( set .@l,0; .@l < getarraysize(MS_Types); set .@l,.@l + 1)
			if(getiteminfo(@inventorylist_id[.@i],2) == (MS_Types[.@l]-1) ) {
				set .@e,1;
				break;
			}
		// Check if the selected item id was already mentioned for having more of the same than once
		for ( set .@d,0; .@d < getarraysize(.@dup_item); set .@d,.@d + 1)
			if(@inventorylist_id[.@i] == .@dup_item[.@d]) {
				set .@e,1;
				break;
			}
		if(.@e) continue;

		// Checking if an item is equipped while you have multiply items of it in your inventory,
		// preventing it of selling accidently
		for ( set .@t,0; .@t < 20; set .@t,.@t + 1)
			if(getequipid(.@t) == @inventorylist_id[.@i]) {
				message strcharinfo(0),.n$+": You have the following item equipped and in your inventory, which I will not sell: "+countitem(@inventorylist_id[.@i])+"x "+getitemname(@inventorylist_id[.@i])+"!";
				setarray .@dup_item[getarraysize(.@dup_item)],@inventorylist_id[.@i];
				set .@e,1;
				break;
			}
		if(.@e) continue;
		setarray .@sellid[getarraysize(.@sellid)],@inventorylist_id[.@i];
	}
	for ( set .@s,0; .@s < getarraysize(.@sellid); set .@s,.@s + 1) {
		set .@total,.@total + (getiteminfo(.@sellid[.@s],1)*countitem(.@sellid[.@s]));
		delitem2 .@sellid[.@s],countitem(.@sellid[.@s]),1,0,0,0,0,0,0;
	}
	mes .n$;
	if(getarraysize(.@sellid) > 0) {
		mes "Your items were sold and you recieved "+.@total+" Zeny.";
		set Zeny,Zeny + .@total;
	} else
		mes "No Items were sold, therefore you don't recieve any Zeny.";
	break;

	case 2:
	mes .n$;
	mes "What do you want to do?";
	next;
	if(select("- Add Item Type:- Remove Item Type") == 1) {
		mes .n$;
		mes "Please choose which Item Type you want to add to your list:";
		for ( set .@l,0; .@l < getarraysize(.itemtypestxt$); set .@l,.@l + 1)
			set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@l] + ( (.itemtypestxt$[.@l+1] != "")?":":"");

		set .@it,select(.@ms_list$) - 1;
		next;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			if(.@it == MS_Types[.@p]) {
				mes "This Item Type is already included in your list. Please choose a different one.";
				close;
			}
		mes "The Item Type \""+.itemtypestxt$[.@it]+"\" has been added.";
		setarray MS_Types[getarraysize(MS_Types)],.itemtypesid[.@it];
	} else {
		mes .n$;
		if(!getarraysize(MS_Types)) {
			mes "I'm sorry, but there is nothing to remove.";
			close;
		}
		mes "Please choose which Item Type you want to remove from your list:";
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@p] == .itemtypesid[.@q])
					set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@q] + ( (MS_Types[.@p+1] != 0)?":":"");
		next;
		set .@it,select(.@ms_list$) - 1;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@it] == .itemtypesid[.@q]) {
					mes "The Item Type \""+.itemtypestxt$[.@q]+"\" has been removed.";
					deletearray MS_Types[.@it],1;
					end;
				}
	}
	break;

	case 3:
	break;
}
end;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
setarray .itemtypestxt$[0],"Healing","Usable","Equipment","Weapon","Card","Pet Egg","Pet Equipment","Ammuntion","Usable with delay","Shadow Equipment","Usable with confirmation";
setarray .itemtypesid[0],1,3,5,6,7,8,9,11,12,13,19;
end;
}

 

Edited by jeromeblade

Share this post


Link to post
Share on other sites

Chris, there are two bracket in Mass Seller script doesn't have Right Curly Bracket. At line 144.

Thank you for your wonderful script!

Edit: Nevermind got it work.

 

On 11/3/2018 at 9:55 PM, jeromeblade said:

Hi Chris, i got an error in this script "mass seller"

i tried to put 1 curly brace at the end but it shows a new error. please help me to fix it. thank you.

missing 1 right curlys at file npc/custom/mass_seller.txt , line 144

 

prontera,150,180,4	script	Mass Seller	100,{
mes .n$;
mes "Welcome, "+strcharinfo(0)+"!";
mes "How can I help you?";
next;
switch(select("- Sell Items:- Personal Config:- Leave")) {
	case 1:
	mes .n$;
	if(!getarraysize(MS_Types)) {
		mes "If this is your first time using my service, I would recommend you setup your personal config before proceeding.";
		mes "Otherwise I will sell every Item in your Inventory, except Refined Equipment and Equipment with Cards.";
		mes " ";
	} else {
		mes "Here is the current list of your ignored items:";
			for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
				for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
					if(MS_Types[.@p] == .itemtypesid[.@q])
						mes " > "+.itemtypestxt$[.@q];

	next;
	if(select("- Continue:- Leave") - 1) close;
	getinventorylist;
	for ( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1) {
		set .@e,0;
		// Skip Equipment which is: Equipped, Refined and has Cards/Enchantments
		if(@inventorylist_equip[.@i] != 0) continue;
		if(@inventorylist_refine[.@i] != 0) continue;
		if(@inventorylist_card1[.@i] != 0) continue;
		if(@inventorylist_card2[.@i] != 0) continue;
		if(@inventorylist_card3[.@i] != 0) continue;
		if(@inventorylist_card4[.@i] != 0) continue;
		for ( set .@l,0; .@l < getarraysize(MS_Types); set .@l,.@l + 1)
			if(getiteminfo(@inventorylist_id[.@i],2) == (MS_Types[.@l]-1) ) {
				set .@e,1;
				break;
			}
		// Check if the selected item id was already mentioned for having more of the same than once
		for ( set .@d,0; .@d < getarraysize(.@dup_item); set .@d,.@d + 1)
			if(@inventorylist_id[.@i] == .@dup_item[.@d]) {
				set .@e,1;
				break;
			}
		if(.@e) continue;

		// Checking if an item is equipped while you have multiply items of it in your inventory,
		// preventing it of selling accidently
		for ( set .@t,0; .@t < 20; set .@t,.@t + 1)
			if(getequipid(.@t) == @inventorylist_id[.@i]) {
				message strcharinfo(0),.n$+": You have the following item equipped and in your inventory, which I will not sell: "+countitem(@inventorylist_id[.@i])+"x "+getitemname(@inventorylist_id[.@i])+"!";
				setarray .@dup_item[getarraysize(.@dup_item)],@inventorylist_id[.@i];
				set .@e,1;
				break;
			}
		if(.@e) continue;
		setarray .@sellid[getarraysize(.@sellid)],@inventorylist_id[.@i];
	}
	for ( set .@s,0; .@s < getarraysize(.@sellid); set .@s,.@s + 1) {
		set .@total,.@total + (getiteminfo(.@sellid[.@s],1)*countitem(.@sellid[.@s]));
		delitem2 .@sellid[.@s],countitem(.@sellid[.@s]),1,0,0,0,0,0,0;
	}
	mes .n$;
	if(getarraysize(.@sellid) > 0) {
		mes "Your items were sold and you recieved "+.@total+" Zeny.";
		set Zeny,Zeny + .@total;
	} else
		mes "No Items were sold, therefore you don't recieve any Zeny.";
	break;

	case 2:
	mes .n$;
	mes "What do you want to do?";
	next;
	if(select("- Add Item Type:- Remove Item Type") == 1) {
		mes .n$;
		mes "Please choose which Item Type you want to add to your list:";
		for ( set .@l,0; .@l < getarraysize(.itemtypestxt$); set .@l,.@l + 1)
			set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@l] + ( (.itemtypestxt$[.@l+1] != "")?":":"");

		set .@it,select(.@ms_list$) - 1;
		next;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			if(.@it == MS_Types[.@p]) {
				mes "This Item Type is already included in your list. Please choose a different one.";
				close;
			}
		mes "The Item Type \""+.itemtypestxt$[.@it]+"\" has been added.";
		setarray MS_Types[getarraysize(MS_Types)],.itemtypesid[.@it];
	} else {
		mes .n$;
		if(!getarraysize(MS_Types)) {
			mes "I'm sorry, but there is nothing to remove.";
			close;
		}
		mes "Please choose which Item Type you want to remove from your list:";
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@p] == .itemtypesid[.@q])
					set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@q] + ( (MS_Types[.@p+1] != 0)?":":"");
		next;
		set .@it,select(.@ms_list$) - 1;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@it] == .itemtypesid[.@q]) {
					mes "The Item Type \""+.itemtypestxt$[.@q]+"\" has been removed.";
					deletearray MS_Types[.@it],1;
					end;
				}
	}
	break;

	case 3:
	break;
}
end;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
setarray .itemtypestxt$[0],"Healing","Usable","Equipment","Weapon","Card","Pet Egg","Pet Equipment","Ammuntion","Usable with delay","Shadow Equipment","Usable with confirmation";
setarray .itemtypesid[0],1,3,5,6,7,8,9,11,12,13,19;
end;
}

 

Jerome, I got it. You have to put curly right bracket at the end of line 38. So it should look like this

 

Quote

    } else {
        mes "Here is the current list of your ignored items:";
            for ( set [email protected],0; [email protected] < getarraysize(MS_Types); set [email protected],[email protected] + 1)
                for ( set [email protected],0; [email protected] < getarraysize(.itemtypesid); set [email protected],[email protected] + 1)
                    if(MS_Types[[email protected]] == .itemtypesid[[email protected]])
                        mes " > "+.itemtypestxt$[[email protected]];}

Edit: I was wrong. This edit make NPC appear but it doesn't make script  work.

Edited by yagamiraito
Got solution

Share this post


Link to post
Share on other sites
On 10/25/2018 at 11:43 AM, llchrisll said:
  • Added Pagination function

How to use? Could you post an example menu using the function?

Share this post


Link to post
Share on other sites
On 11/3/2018 at 2:55 PM, jeromeblade said:

Hi Chris, i got an error in this script "mass seller"

i tried to put 1 curly brace at the end but it shows a new error. please help me to fix it. thank you.

missing 1 right curlys at file npc/custom/mass_seller.txt , line 144

 

prontera,150,180,4	script	Mass Seller	100,{
mes .n$;
mes "Welcome, "+strcharinfo(0)+"!";
mes "How can I help you?";
next;
switch(select("- Sell Items:- Personal Config:- Leave")) {
	case 1:
	mes .n$;
	if(!getarraysize(MS_Types)) {
		mes "If this is your first time using my service, I would recommend you setup your personal config before proceeding.";
		mes "Otherwise I will sell every Item in your Inventory, except Refined Equipment and Equipment with Cards.";
		mes " ";
	} else {
		mes "Here is the current list of your ignored items:";
			for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
				for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
					if(MS_Types[.@p] == .itemtypesid[.@q])
						mes " > "+.itemtypestxt$[.@q];

	next;
	if(select("- Continue:- Leave") - 1) close;
	getinventorylist;
	for ( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1) {
		set .@e,0;
		// Skip Equipment which is: Equipped, Refined and has Cards/Enchantments
		if(@inventorylist_equip[.@i] != 0) continue;
		if(@inventorylist_refine[.@i] != 0) continue;
		if(@inventorylist_card1[.@i] != 0) continue;
		if(@inventorylist_card2[.@i] != 0) continue;
		if(@inventorylist_card3[.@i] != 0) continue;
		if(@inventorylist_card4[.@i] != 0) continue;
		for ( set .@l,0; .@l < getarraysize(MS_Types); set .@l,.@l + 1)
			if(getiteminfo(@inventorylist_id[.@i],2) == (MS_Types[.@l]-1) ) {
				set .@e,1;
				break;
			}
		// Check if the selected item id was already mentioned for having more of the same than once
		for ( set .@d,0; .@d < getarraysize(.@dup_item); set .@d,.@d + 1)
			if(@inventorylist_id[.@i] == .@dup_item[.@d]) {
				set .@e,1;
				break;
			}
		if(.@e) continue;

		// Checking if an item is equipped while you have multiply items of it in your inventory,
		// preventing it of selling accidently
		for ( set .@t,0; .@t < 20; set .@t,.@t + 1)
			if(getequipid(.@t) == @inventorylist_id[.@i]) {
				message strcharinfo(0),.n$+": You have the following item equipped and in your inventory, which I will not sell: "+countitem(@inventorylist_id[.@i])+"x "+getitemname(@inventorylist_id[.@i])+"!";
				setarray .@dup_item[getarraysize(.@dup_item)],@inventorylist_id[.@i];
				set .@e,1;
				break;
			}
		if(.@e) continue;
		setarray .@sellid[getarraysize(.@sellid)],@inventorylist_id[.@i];
	}
	for ( set .@s,0; .@s < getarraysize(.@sellid); set .@s,.@s + 1) {
		set .@total,.@total + (getiteminfo(.@sellid[.@s],1)*countitem(.@sellid[.@s]));
		delitem2 .@sellid[.@s],countitem(.@sellid[.@s]),1,0,0,0,0,0,0;
	}
	mes .n$;
	if(getarraysize(.@sellid) > 0) {
		mes "Your items were sold and you recieved "+.@total+" Zeny.";
		set Zeny,Zeny + .@total;
	} else
		mes "No Items were sold, therefore you don't recieve any Zeny.";
	break;

	case 2:
	mes .n$;
	mes "What do you want to do?";
	next;
	if(select("- Add Item Type:- Remove Item Type") == 1) {
		mes .n$;
		mes "Please choose which Item Type you want to add to your list:";
		for ( set .@l,0; .@l < getarraysize(.itemtypestxt$); set .@l,.@l + 1)
			set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@l] + ( (.itemtypestxt$[.@l+1] != "")?":":"");

		set .@it,select(.@ms_list$) - 1;
		next;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			if(.@it == MS_Types[.@p]) {
				mes "This Item Type is already included in your list. Please choose a different one.";
				close;
			}
		mes "The Item Type \""+.itemtypestxt$[.@it]+"\" has been added.";
		setarray MS_Types[getarraysize(MS_Types)],.itemtypesid[.@it];
	} else {
		mes .n$;
		if(!getarraysize(MS_Types)) {
			mes "I'm sorry, but there is nothing to remove.";
			close;
		}
		mes "Please choose which Item Type you want to remove from your list:";
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@p] == .itemtypesid[.@q])
					set .@ms_list$,.@ms_list$ + "- "+.itemtypestxt$[.@q] + ( (MS_Types[.@p+1] != 0)?":":"");
		next;
		set .@it,select(.@ms_list$) - 1;
		mes .n$;
		for ( set .@p,0; .@p < getarraysize(MS_Types); set .@p,.@p + 1)
			for ( set .@q,0; .@q < getarraysize(.itemtypesid); set .@q,.@q + 1)
				if(MS_Types[.@it] == .itemtypesid[.@q]) {
					mes "The Item Type \""+.itemtypestxt$[.@q]+"\" has been removed.";
					deletearray MS_Types[.@it],1;
					end;
				}
	}
	break;

	case 3:
	break;
}
end;

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
setarray .itemtypestxt$[0],"Healing","Usable","Equipment","Weapon","Card","Pet Egg","Pet Equipment","Ammuntion","Usable with delay","Shadow Equipment","Usable with confirmation";
setarray .itemtypesid[0],1,3,5,6,7,8,9,11,12,13,19;
end;
}

 

 

On 11/17/2018 at 8:54 PM, yagamiraito said:

Chris, there are two bracket in Mass Seller script doesn't have Right Curly Bracket. At line 144.

Thank you for your wonderful script!

Edit: Nevermind got it work.

 

Jerome, I got it. You have to put curly right bracket at the end of line 38. So it should look like this

 

Edit: I was wrong. This edit make NPC appear but it doesn't make script  work.

As soon as I have time I will test the script, not sure what happened there.

I'm currently busy with my battle royal script.

3 hours ago, M4karov said:

How to use? Could you post an example menu using the function?

In line 22 is an example. otherwise I use the same function in my Dungeon Quest Service at line 253.

Basically you save the menu entries into am single variable with implode and define the max entries, the function creates an menu and returns the value of "@menu" based on the option you chose from the array which was imploded for the function.

Share this post


Link to post
Share on other sites

i tried using the GoldRoom PVP 1.1v

//===== rAthena Script =======================================
//= Gold Room Battle
//===== By ===================================================
//= llchrisll
//===== Version ==============================================
//= 1.0 - Initial Version
//= 1.1 - Fixed bugs and tested
//        Exchanged "atcommand @cleanmap" with script command "cleanmap"
//===== Tested With =========================================
//= rAthena SQL 07/16-2017 Revision
//===== Description ==========================================
//= A battle over an gold room, which occures on every ".delay" days.
//  Players can visit their gold room for ".dur" minutes, there is no delay restriction.
//  See 'OnInit' for config.
//===== Comments =============================================
//= Request by Paulinds
//  http://rathena.org/board/topic/59504-list-of-my-script-request/
//============================================================
prontera,164,172,4	script	Gold Room Battle	100,{

mes .n$;
mes "Hello,"+ strcharinfo(0)+".";
mes "How may I help you?";
if(getgmlevel() > .gm) 
	if(select("- GM Menu:- Player Menu") - 2) goto GM_M;
mes "Do you need information about the access to the Gold Room or about the Gold Room Battle?";
if(.timer == .delay) mes "Or do you want to participate?";
mes "The next battle will be in "+ (.delay-.timer) +" day(s).";
next;
switch(select("- "+( ($gold_acc == getcharid(3))?"Warp to Gold Room":"Ownership")+":- "+( (.GRB_Room == 1)?"Battle!!!":"Room Closed")+":- Information:- Nevermind") ) {
	
	case 1:
	mes .n$;
	if($gold_acc && ($gold_acc == getcharid(3)) ) {
		mes "Do you want to enter the Gold Room?";
		mes "^FF0000Note: You'll be automatically warped back to your Save Point after "+.dur+" minutes.^000000";
		if(select("- Yes:- No") - 1) close;
		next;
		mes .n$;
		mes "Okay, here we go.";
		close2;
		warp .gold$,.gold_x,.gold_y;
		sleep2( .dur*60*1000 ); // Minutes*60 > Seconds*1000 = Milliseconds required for sleep2
		doevent strnpcinfo(0)+"::OnDone";
	} else if($gold_acc != getcharid(3))
		mes "The current owner is ^00FF00"+$gold_n$+"^000000.";
	break;
	
	case 2:
	mes .n$;
	if(!.GRB_Room) {
		mes "I'm sorry, but the battle isn't open yet.";
		close;
	}
	if(getmapusers(.pvp$) >= .limit) {
		mes "I'm sorry, but the limit of "+.limit+" player has been reached.";
		close;
	}
	mes "Do you want to join the Gold Room Battle?";
	if(select("- Yes:- No") - 1) close;
	next;
	mes .n$;
	mes "I will warp you now to the battlefield.";
	close2;
	warp .pvp$,0,0;
	set @gold,1;
	sleep2 2000;
	if(getmapusers(.pvp$) == .limit) doevent strnpcinfo(0)+"::OnBattleStart";
	break;
	
	case 3:
	mes .n$;
	mes "[ === Battle === ]";
	mes "The Gold Room Battle is, like the name says, an pvp-type event where the last one to survive will be rewarded with access to his/her own Gold Room until the next battle.";
	mes "The whole event has a max duration of "+.min+" minutes.";
	mes "There can up to "+.limit+" players to battle with an registration time of 3 minutes.";
	mes "The next battle is in "+.delay +" days after the last one.";
	mes " ";
	mes "[ === Gold Room === ]";
	mes "The winner of an battle can visit his/her gold room in this "+.delay+" days for "+.dur+" minutes and always.";
	mes "That means there are no restrictions in usage.";
	break;
	
	case 4:
	break;
}
end;

GM_M:
next;
mes .n$;
mes "What now?";
if(select("- Start/Stop Event:- Nevermind") - 1) close;
next;
if(.GRB_Eve) doevent strnpcinfo(0)+"::OnDisable"; 
else doevent strnpcinfo(0)+"::OnPrepare";
mes .n$;
mes "The event has turned "+ ( (.GRB_Eve)?"off":"on")+".";
close;

OnPCLogoutEvent:
if(getcharid(3) != $gold_acc) end;
OnDone:
cleanmap .gold$,88,111,168,191;
warp "SavePoint",0,0;
end;

OnPCLoadMapEvent:
if( (strcharinfo(3) == .pvp$ && [email protected]) || (strcharinfo(3) == .gold$ && getcharid(3) != $gold_acc) ) {
	dispbottom .n$+": I'll warp you back to your savepoint because either you tried to join the battle, though you didn't register first or you tried to visit the gold room of another player.";
	warp "SavePoint",0,0;
	end;
}
while(getmapusers(.gold$) != 0) {
	makeitem 969,1,.gold$,rand(88,111),rand(168,191);
	sleep2 1000;
}		
cleanmap .gold$,88,111,168,191;
end;

OnPrepare:
set .timer,.delay*60*24;
OnMinute00:
set .timer,.timer + 1;
if( (.timer/60)/24 >= .delay) {
	if(getmapusers(.pvp$) > 0) {
		mapannounce .pvp$,.n$+": I will warp you all back to prontera, because I need this map for the Gold Room Battle.",bc_all;
		sleep 5000;
		mapwarp .pvp$,"prontera",150,180;
	}
	set .timer,0;
	set $gold_acc,0;
	announce .n$+": The gold room battle will begin shortly!!!",bc_all;
	sleep 10000;
	announce .n$+": You have 3 minutes to register, which starts now!!!",bc_all;
	initnpctimer;
	set .GRB_Eve,1;
	set .GRB_Room,1;
	if(getmapflag(.pvp$,mf_gvg) == 1) {
		set .gvg,1;
		removemapflag .pvp$,mf_gvg;
	}
	if(getmapflag(.pvp$,mf_pvp) == 1) {
		set .pvp,1;
		pvpoff .pvp$;
	}
	while(.GRB_Room) {
		waitingroom "Current Fighters: "+getmapusers(.pvp$),0;
		sleep 2000;
		delwaitingroom;
	}
}
end;

OnTimer120000: // 2 Minutes
announce .n$+": Hurry guys, 1 minute left!!!!",bc_all;
end;

Ontimer180000: // 3 Minutes
OnBattleStart:
stopnpctimer;
set .GRB_Room,0;
announce .n$+": Registration closed, let's see how many have registered....",bc_all;
sleep 10000;
if(getmapusers(.pvp$) < 2) {
	announce .n$+": It seems like there are not enough players to start the battle.",bc_all;
	goto OnDisable;
}
setmapflag .pvp$,mf_noreturn;
setmapflag .pvp$,mf_nowarpto;
setmapflag .pvp$,mf_nowarp;
setmapflag .pvp$,mf_noteleport;
setmapflag .pvp$,mf_nosave;
setmapflag .pvp$,mf_nomemo;
setmapflag .pvp$,mf_partylock;
setmapflag .pvp$,mf_pvp_noparty;
setmapflag .pvp$,mf_pvp_noguild;
setmapflag .pvp$,mf_loadevent;
announce .n$+": There are "+getmapusers(.pvp$)+" players registered.",bc_all;
sleep 5000;
announce .n$+": I will start the battle in 10 seconds!! Particpants, prepare yourself!! I also wish you good luck all!!",bc_all;
sleep 5000;
mapannounce .pvp$,.n$+": 5 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 4 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 3 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 2 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 1 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": GO !!!!",bc_all;
pvpon .pvp$;
startnpctimer;
set .t_ck,0; // Timer Check
end;

OnTimer360000: // 3 Min = 180 seconds (Registration Time) + each min = 60 seconds > 360000 milliseconds
stopnpctimer;
set .t_ck,.t_ck + 1;
if(.t_ck == .min/2) {
	mapannounce .pvp$,.n$+": "+.min/2+" minutes have passed!!",bc_all;
	if(getmapusers(.pvp$) == 0) {
		sleep 10000;
		mapannounce .pvp$,.n$+": Huh?! Where did the players disappear to? Since there are none, I will end the battle.",bc_all;
		goto OnDisable;
	}
} else if(.t_ck == .min) {
	mapannounce .pvp$,.n$+": "+.min+" minutes have passed!! Since no one has won this battle, I will end this battle!!",bc_all;
	goto OnDisable;
}
setnpctimer 180100; // Reseting the timer back to after the registration time has passed
startnpctimer;
end;

OnDisable:
set .GRB_Room,0;
delwaitingroom;
removemapflag .pvp$,mf_noreturn;
removemapflag .pvp$,mf_nowarpto;
removemapflag .pvp$,mf_nowarp;
removemapflag .pvp$,mf_noteleport;
removemapflag .pvp$,mf_nosave;
removemapflag .pvp$,mf_nomemo;
removemapflag .pvp$,mf_partylock;
removemapflag .pvp$,mf_pvp_noparty;
removemapflag .pvp$,mf_pvp_noguild;
removemapflag .pvp$,mf_loadevent;
if(.gvg) {
	set .gvg,0;
	setmapflag .pvp$,mf_gvg;
}
if(!.pvp) pvpoff .pvp$;
else set .pvp,0;
announce .n$+": The event, Gold Room Battle, has ended!!!",bc_all;
mapannounce .pvp$,.n$+": You all will be warped in 10 seconds back to prontera.",bc_all;
sleep 10000;
mapwarp .pvp$,"prontera.gat",150,180;
set .GRB_Eve,0;
end;

OnPCKillEvent:
if(strcharinfo(3) != .pvp$ || [email protected] ) end;
mapannounce .pvp$,.n$+": "+strcharinfo(0)+" has killed "+rid2name(killedrid)+"!!",bc_all;
end;

OnPCDieEvent:
if(strcharinfo(3) != .pvp$ || [email protected] ) end;
if(killerrid != getcharid(3)) dispbottom .n$+": You have been killed by "+rid2name(killerrid)+"!!";
set @gold,0;
sleep2 500;
warp "SavePoint",0,0;
sleep2 1500; // Slowing down the script
if(HP == 0) atcommand "@alive";
percentheal 50,50;
if(getmapusers(.pvp$) == 2) mapannounce .pvp$,.n$+": Wuhu!! Only 2 players remain, let's see who is the better player!!",bc_all;
else if(getmapusers(.pvp$) == 1) {
	announce .n$+": The winner of the Gold Room Battle is "+ rid2name(killerrid)+".",bc_all;
	set $gold_acc,killerrid; // Saving RID of the winner
	set $gold_n$,rid2name($gold_acc);
	detachrid;
	if(attachrid($gold_acc) == 1) dispbottom .n$+": You have won the Gold Room Battle, if you want to enter your Gold Room, please talk to me.";
	goto OnDisable;
} else if(getmapusers(.pvp$) == 0) goto OnDisable;
end;


OnInit:
set .n$,"["+strnpcinfo(1)+"]"; // NPC Name
set .limit,10; // Max Players
set .min,15; // Battle Duration
set .pvp$,"guild_vs5"; // Map for the PvP Room
set .gold$,"new_zone04"; // Map for the Gold Room
set .gold_x,100; // X Coordinate for the Gold Room where to be warped to
set .gold_y,181; // Y Coordinate for the Gold Room where to be warped to
// If the PvP Map is not the same as the Gold Room Map,
// use special mapflags and sets variable to disinguish
set .diff,0;
if(.pvp$ != .gold$) { 
	setmapflag .gold$,mf_noreturn;
	setmapflag .gold$,mf_nowarp;
	setmapflag .gold$,mf_nomemo;
	setmapflag .gold$,mf_nosave;
	setmapflag .gold$,mf_nowarpto;
	setmapflag .gold$,mf_noteleport;
	setmapflag .gold$,mf_loadevent;
	set .diff,1;
}
set .delay,2; // Delay in days in which interval the battle will be hold.
set .dur,1;// Gold Room Visit in minutes
end;
}

and i found a error on my console

2088512315_gold_room_pvperror.jpg.f435851a4322c306d0c3dad2201bc4b6.jpg

how to fix this error.

and how to make this event happen every 2 hours.

Share this post


Link to post
Share on other sites
On 2/5/2019 at 4:33 PM, NakedWolf said:

i tried using the GoldRoom PVP 1.1v

//===== rAthena Script =======================================
//= Gold Room Battle
//===== By ===================================================
//= llchrisll
//===== Version ==============================================
//= 1.0 - Initial Version
//= 1.1 - Fixed bugs and tested
//        Exchanged "atcommand @cleanmap" with script command "cleanmap"
//===== Tested With =========================================
//= rAthena SQL 07/16-2017 Revision
//===== Description ==========================================
//= A battle over an gold room, which occures on every ".delay" days.
//  Players can visit their gold room for ".dur" minutes, there is no delay restriction.
//  See 'OnInit' for config.
//===== Comments =============================================
//= Request by Paulinds
//  http://rathena.org/board/topic/59504-list-of-my-script-request/
//============================================================
prontera,164,172,4	script	Gold Room Battle	100,{

mes .n$;
mes "Hello,"+ strcharinfo(0)+".";
mes "How may I help you?";
if(getgmlevel() > .gm) 
	if(select("- GM Menu:- Player Menu") - 2) goto GM_M;
mes "Do you need information about the access to the Gold Room or about the Gold Room Battle?";
if(.timer == .delay) mes "Or do you want to participate?";
mes "The next battle will be in "+ (.delay-.timer) +" day(s).";
next;
switch(select("- "+( ($gold_acc == getcharid(3))?"Warp to Gold Room":"Ownership")+":- "+( (.GRB_Room == 1)?"Battle!!!":"Room Closed")+":- Information:- Nevermind") ) {
	
	case 1:
	mes .n$;
	if($gold_acc && ($gold_acc == getcharid(3)) ) {
		mes "Do you want to enter the Gold Room?";
		mes "^FF0000Note: You'll be automatically warped back to your Save Point after "+.dur+" minutes.^000000";
		if(select("- Yes:- No") - 1) close;
		next;
		mes .n$;
		mes "Okay, here we go.";
		close2;
		warp .gold$,.gold_x,.gold_y;
		sleep2( .dur*60*1000 ); // Minutes*60 > Seconds*1000 = Milliseconds required for sleep2
		doevent strnpcinfo(0)+"::OnDone";
	} else if($gold_acc != getcharid(3))
		mes "The current owner is ^00FF00"+$gold_n$+"^000000.";
	break;
	
	case 2:
	mes .n$;
	if(!.GRB_Room) {
		mes "I'm sorry, but the battle isn't open yet.";
		close;
	}
	if(getmapusers(.pvp$) >= .limit) {
		mes "I'm sorry, but the limit of "+.limit+" player has been reached.";
		close;
	}
	mes "Do you want to join the Gold Room Battle?";
	if(select("- Yes:- No") - 1) close;
	next;
	mes .n$;
	mes "I will warp you now to the battlefield.";
	close2;
	warp .pvp$,0,0;
	set @gold,1;
	sleep2 2000;
	if(getmapusers(.pvp$) == .limit) doevent strnpcinfo(0)+"::OnBattleStart";
	break;
	
	case 3:
	mes .n$;
	mes "[ === Battle === ]";
	mes "The Gold Room Battle is, like the name says, an pvp-type event where the last one to survive will be rewarded with access to his/her own Gold Room until the next battle.";
	mes "The whole event has a max duration of "+.min+" minutes.";
	mes "There can up to "+.limit+" players to battle with an registration time of 3 minutes.";
	mes "The next battle is in "+.delay +" days after the last one.";
	mes " ";
	mes "[ === Gold Room === ]";
	mes "The winner of an battle can visit his/her gold room in this "+.delay+" days for "+.dur+" minutes and always.";
	mes "That means there are no restrictions in usage.";
	break;
	
	case 4:
	break;
}
end;

GM_M:
next;
mes .n$;
mes "What now?";
if(select("- Start/Stop Event:- Nevermind") - 1) close;
next;
if(.GRB_Eve) doevent strnpcinfo(0)+"::OnDisable"; 
else doevent strnpcinfo(0)+"::OnPrepare";
mes .n$;
mes "The event has turned "+ ( (.GRB_Eve)?"off":"on")+".";
close;

OnPCLogoutEvent:
if(getcharid(3) != $gold_acc) end;
OnDone:
cleanmap .gold$,88,111,168,191;
warp "SavePoint",0,0;
end;

OnPCLoadMapEvent:
if( (strcharinfo(3) == .pvp$ && [email protected]) || (strcharinfo(3) == .gold$ && getcharid(3) != $gold_acc) ) {
	dispbottom .n$+": I'll warp you back to your savepoint because either you tried to join the battle, though you didn't register first or you tried to visit the gold room of another player.";
	warp "SavePoint",0,0;
	end;
}
while(getmapusers(.gold$) != 0) {
	makeitem 969,1,.gold$,rand(88,111),rand(168,191);
	sleep2 1000;
}		
cleanmap .gold$,88,111,168,191;
end;

OnPrepare:
set .timer,.delay*60*24;
OnMinute00:
set .timer,.timer + 1;
if( (.timer/60)/24 >= .delay) {
	if(getmapusers(.pvp$) > 0) {
		mapannounce .pvp$,.n$+": I will warp you all back to prontera, because I need this map for the Gold Room Battle.",bc_all;
		sleep 5000;
		mapwarp .pvp$,"prontera",150,180;
	}
	set .timer,0;
	set $gold_acc,0;
	announce .n$+": The gold room battle will begin shortly!!!",bc_all;
	sleep 10000;
	announce .n$+": You have 3 minutes to register, which starts now!!!",bc_all;
	initnpctimer;
	set .GRB_Eve,1;
	set .GRB_Room,1;
	if(getmapflag(.pvp$,mf_gvg) == 1) {
		set .gvg,1;
		removemapflag .pvp$,mf_gvg;
	}
	if(getmapflag(.pvp$,mf_pvp) == 1) {
		set .pvp,1;
		pvpoff .pvp$;
	}
	while(.GRB_Room) {
		waitingroom "Current Fighters: "+getmapusers(.pvp$),0;
		sleep 2000;
		delwaitingroom;
	}
}
end;

OnTimer120000: // 2 Minutes
announce .n$+": Hurry guys, 1 minute left!!!!",bc_all;
end;

Ontimer180000: // 3 Minutes
OnBattleStart:
stopnpctimer;
set .GRB_Room,0;
announce .n$+": Registration closed, let's see how many have registered....",bc_all;
sleep 10000;
if(getmapusers(.pvp$) < 2) {
	announce .n$+": It seems like there are not enough players to start the battle.",bc_all;
	goto OnDisable;
}
setmapflag .pvp$,mf_noreturn;
setmapflag .pvp$,mf_nowarpto;
setmapflag .pvp$,mf_nowarp;
setmapflag .pvp$,mf_noteleport;
setmapflag .pvp$,mf_nosave;
setmapflag .pvp$,mf_nomemo;
setmapflag .pvp$,mf_partylock;
setmapflag .pvp$,mf_pvp_noparty;
setmapflag .pvp$,mf_pvp_noguild;
setmapflag .pvp$,mf_loadevent;
announce .n$+": There are "+getmapusers(.pvp$)+" players registered.",bc_all;
sleep 5000;
announce .n$+": I will start the battle in 10 seconds!! Particpants, prepare yourself!! I also wish you good luck all!!",bc_all;
sleep 5000;
mapannounce .pvp$,.n$+": 5 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 4 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 3 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 2 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": 1 seconds left!!!",bc_all;
sleep 1000;
mapannounce .pvp$,.n$+": GO !!!!",bc_all;
pvpon .pvp$;
startnpctimer;
set .t_ck,0; // Timer Check
end;

OnTimer360000: // 3 Min = 180 seconds (Registration Time) + each min = 60 seconds > 360000 milliseconds
stopnpctimer;
set .t_ck,.t_ck + 1;
if(.t_ck == .min/2) {
	mapannounce .pvp$,.n$+": "+.min/2+" minutes have passed!!",bc_all;
	if(getmapusers(.pvp$) == 0) {
		sleep 10000;
		mapannounce .pvp$,.n$+": Huh?! Where did the players disappear to? Since there are none, I will end the battle.",bc_all;
		goto OnDisable;
	}
} else if(.t_ck == .min) {
	mapannounce .pvp$,.n$+": "+.min+" minutes have passed!! Since no one has won this battle, I will end this battle!!",bc_all;
	goto OnDisable;
}
setnpctimer 180100; // Reseting the timer back to after the registration time has passed
startnpctimer;
end;

OnDisable:
set .GRB_Room,0;
delwaitingroom;
removemapflag .pvp$,mf_noreturn;
removemapflag .pvp$,mf_nowarpto;
removemapflag .pvp$,mf_nowarp;
removemapflag .pvp$,mf_noteleport;
removemapflag .pvp$,mf_nosave;
removemapflag .pvp$,mf_nomemo;
removemapflag .pvp$,mf_partylock;
removemapflag .pvp$,mf_pvp_noparty;
removemapflag .pvp$,mf_pvp_noguild;
removemapflag .pvp$,mf_loadevent;
if(.gvg) {
	set .gvg,0;
	setmapflag .pvp$,mf_gvg;
}
if(!.pvp) pvpoff .pvp$;
else set .pvp,0;
announce .n$+": The event, Gold Room Battle, has ended!!!",bc_all;
mapannounce .pvp$,.n$+": You all will be warped in 10 seconds back to prontera.",bc_all;
sleep 10000;
mapwarp .pvp$,"prontera.gat",150,180;
set .GRB_Eve,0;
end;

OnPCKillEvent:
if(strcharinfo(3) != .pvp$ || [email protected] ) end;
mapannounce .pvp$,.n$+": "+strcharinfo(0)+" has killed "+rid2name(killedrid)+"!!",bc_all;
end;

OnPCDieEvent:
if(strcharinfo(3) != .pvp$ || [email protected] ) end;
if(killerrid != getcharid(3)) dispbottom .n$+": You have been killed by "+rid2name(killerrid)+"!!";
set @gold,0;
sleep2 500;
warp "SavePoint",0,0;
sleep2 1500; // Slowing down the script
if(HP == 0) atcommand "@alive";
percentheal 50,50;
if(getmapusers(.pvp$) == 2) mapannounce .pvp$,.n$+": Wuhu!! Only 2 players remain, let's see who is the better player!!",bc_all;
else if(getmapusers(.pvp$) == 1) {
	announce .n$+": The winner of the Gold Room Battle is "+ rid2name(killerrid)+".",bc_all;
	set $gold_acc,killerrid; // Saving RID of the winner
	set $gold_n$,rid2name($gold_acc);
	detachrid;
	if(attachrid($gold_acc) == 1) dispbottom .n$+": You have won the Gold Room Battle, if you want to enter your Gold Room, please talk to me.";
	goto OnDisable;
} else if(getmapusers(.pvp$) == 0) goto OnDisable;
end;


OnInit:
set .n$,"["+strnpcinfo(1)+"]"; // NPC Name
set .limit,10; // Max Players
set .min,15; // Battle Duration
set .pvp$,"guild_vs5"; // Map for the PvP Room
set .gold$,"new_zone04"; // Map for the Gold Room
set .gold_x,100; // X Coordinate for the Gold Room where to be warped to
set .gold_y,181; // Y Coordinate for the Gold Room where to be warped to
// If the PvP Map is not the same as the Gold Room Map,
// use special mapflags and sets variable to disinguish
set .diff,0;
if(.pvp$ != .gold$) { 
	setmapflag .gold$,mf_noreturn;
	setmapflag .gold$,mf_nowarp;
	setmapflag .gold$,mf_nomemo;
	setmapflag .gold$,mf_nosave;
	setmapflag .gold$,mf_nowarpto;
	setmapflag .gold$,mf_noteleport;
	setmapflag .gold$,mf_loadevent;
	set .diff,1;
}
set .delay,2; // Delay in days in which interval the battle will be hold.
set .dur,1;// Gold Room Visit in minutes
end;
}

and i found a error on my console

2088512315_gold_room_pvperror.jpg.f435851a4322c306d0c3dad2201bc4b6.jpg

how to fix this error.

and how to make this event happen every 2 hours.

BUMP.

please help thank you

Share this post


Link to post
Share on other sites
Posted (edited)
On 2/8/2019 at 10:45 AM, NakedWolf said:

BUMP.

please help thank you

Sorry for the late reply, as the command itself got changed just remove the coordinates at "cleanmap":

cleanmap .gold$;

As for the every 2 hours part, I will see if I can make it more dynamic about it, currently it's only days.
But as I'm quite busy with my other project, I might take a bit longer to fullfill your request.

Edit: I updated my GIT :).


Regards,
Chris

Edited by llchrisll

Share this post


Link to post
Share on other sites

=============== Update: 05/28-2019: Added 2 Scripts, removed 3 Scripts, modified 3 Scripts a bit & formated the Topic a bit more ============

  • Added Battle Royale and Hunting Grounds Script
  • Removed Broadcaster duo unnecessarity > Channel System
  • Removed Unofficial Nightmare Bio Lab official implementation
  • Removed Unofficial modified Morse Cave Instances by Alayne
  • Updated Mob Invasion to v1.1
  • Modified Costume Enchanter v1.2
  • Modified Gold Room Battle v1.1
  • Removed every Update Log from the Scripts, leaving only the Features present

Next Projects:

  • Dynamic Battleground Arena: Finish Testing
  • Equipment Enchanter: Merge of my Costume Enchanter and Equipment Enchanter with additional features and settings.

Share this post


Link to post
Share on other sites
On 12/21/2011 at 6:28 AM, llchrisll said:

Thanks for that <3, give you a cookie later :D.

Regards,

Chris

Hi can i request a headgear to costume npc. a npc can change your headgear to a costume, required is zenny or free

Share this post


Link to post
Share on other sites
Posted (edited)

If you provide the headgear ID's and Costume ID's, as well which amount of Zeny you want, I can do that.
But will take some time since I'm busy with my other two projects. Maybe I will do it first not sure :I.

Regards,
Chris

Edit: Nvm, done via PM.

Edited by llchrisll
  • Love 1

Share this post


Link to post
Share on other sites
Posted (edited)

=============== Update: 06/10-2019: Added 1 Script ============

  • Added Mystic Enchanter + extra version without Random Options Support
Edited by llchrisll
  • Like 1

Share this post


Link to post
Share on other sites
On 6/10/2019 at 5:00 PM, llchrisll said:

=============== Update: 06/10-2019: Added 1 Script ============

  • Added Mystic Enchanter + extra version without Random Options Support

Hi sir can i request an npc like this?

an npc can Crafts Elemental Converters, and sells Sorcerer Elemental Points and Blank Scrolls.

Share this post


Link to post
Share on other sites

Hi Chris, is this debug common in the Hunting Grounds script or did I install it wrong?

erro houting.jpg

Share this post


Link to post
Share on other sites
14 hours ago, sprdosat said:

Hi Chris, is this debug common in the Hunting Grounds script or did I install it wrong?

erro houting.jpg

Uhh, looks like I forgot to remove that line. No worries, you can delete that line of you want. 

 

12 hours ago, Quesooo said:

any working last man standing?

It should work. Tested it recently.

Share this post


Link to post
Share on other sites

Hi Chris i got a debug on my console saying that

script debug : 20000131 110109701 : 'C_Mobs = 635 and more !

is this normal?

 

im using your hunting ground instance

Share this post


Link to post
Share on other sites

btw im using hunting ground, also can i request how to make hunting quest no spammable like a party can enter the dungeon only 1 day only and if you die you can't enter it again

Share this post


Link to post
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
Reply to this topic...

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

Loading...