Jump to content

Recommended Posts

Posted (edited)

Hi guys, i just made a script, its a random machine, easy to configure, etc.

Idea: Kami thanks you very much!

 

I create easy custom mobs, imposible to give crash. (not custom textures.)

 

Script:

The users camp the custom mobs who drops a unique item, so when you get 10 of them, you talk with the machine, and it gives you a random item (you can configure the items.)

 

Codes:

 

npc/custom/dreamachine.txt

prontera,150,150,4	script	Dream Machine	910,{

//============== NPC CONF ===================
set .@item,530;	// Item needed ID.
set .@itemcant,10;	// Items needed cant.
set .@premiocant,1;	// PRIZE CANT
setarray .@randomitem[0],12103,12107,12105,12108,12109,12110,5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5389,5398,5452,5453,5463,5500,5502,5505,5506,5507,5518,5529,5532,5564; // LIST OF ITEMS, JUST REPLACE WITH THE ITEMS ID
set .@maxitems,getarraysize(.@randomitem);


//=============== SCRIPT =====================
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";;
	mes "Hi! Im Dream Machine!";
	mes "Hey! What can i do for you?";
	next;
	switch(select("Change my items:What is this?:Nothing, thanks."))	{

case 1:
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";
	mes "Ok, but first i will check if you have the necessary items!";
	next;
	if(countitem(.@item) >= .@itemcant)			{
			mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";;
			mes "Hey! You have the items!";
			next;
			delitem .@item, .@itemcant;
			next;
			mes "Here is your prize!";
			getitem( .@randomitem[rand(.@maxitems)], .@premiocant);
			mes "Bye!";
			close;	

		}
	else 	
		{
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";;
	mes "Im sorry but you dont have the items...";
	mes "Come back soon!";
	close;
		}


case 2:
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";;
	mes "Im the dream machine, if you bring me the necessary items i will give you nice treasures!";
	next;
	mes "You need the next things:";
	mes "^FF0000> 10x Cacao ^000000"; // IF YOU WANT ANOTHER ITEM JUST CHANGE THE NAME
	next;
	switch(select("Where i get this?:Thanks you!"))	{

case 1:
	mes "You can find the items in the next maps:"; // IF YOU ADD ANOTHER MAP PUT IT HERE
	mes "^FF0000> Anthell01 x 2 Mobs ^000000";
	mes "^FF0000> Anthell02 x 2 Mobs ^000000";
	mes "^FF0000> Payon Dungeon00 x 2 Mobs ^000000";
	mes "^FF0000> Payon Dungeon01 x 2 Mobs ^000000";
	mes "^FF0000> Payon Dungeon02 x 2 Mobs ^000000";
	mes "^FF0000> Payon Dungeon03 x 2 Mobs ^000000";
	close;


case 2:
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";
	mes "Bye!";
	close;

								}





case 3:
	mes "^0000FFD^FF00BFream ^0000FFM^FF00BFachine^000000";
	mes "Bye!";
	close;



										}


}





///////////////////////////////////////////
//                                       //
//=========== MONSTER SPAWN =============//
//                                       //
///////////////////////////////////////////


anthell01,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0
anthell02,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0
pay_dun00,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0
pay_dun01,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0
pay_dun02,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0
pay_dun03,0,0,0,0	monster	Cacao	2800,5,14400000,7200000,0

//============= rAthena/db/mob_avail.txt =================


// Dream Machine MOB
2800,1784 
1784: Its the view ID of the mob, you can change it for another if you want.
 
 
 

//============= rAthena/db/pre-re//re/mob_db2.txt ============

// Dream Machine MOB
2800,Dream_Cacao,Dream Cacao,Dream Cacao,98,1000,0,0,0,1,0,0,100,99,1,17,1,80,126,20,10,12,2,0,20,0x160,300,1288,288,384,0,0,0,0,0,0,0,512,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

"512,100" change it for your item ID and the rate.

 

 

Please report any bug.

Edited by Promise
  • Upvote 1
Posted

So basically this is a quest that ask players to find mob in specific area and they will get a reward after they killed the mob? What if someone killed the quest's mob?

Posted

Script Release Rules and Regulations

Do not use

 or [code=auto:0] to release your script.
	
	

 

Please update your topic as soon as possible.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...