Jump to content
  • 0
Broker

[Request] NPC Mythril Coin Exchanger

Question

Hi, i'd like to request a NPC that we can exchange like 15 Mythril Coins (674) for 1 selected bro headgear on npc.

 

And about this script below i wanted to know how to configure it to earn each Mythril coins for 60min playing. Thx

 

Hope you can help me!

 

 

-	script	Presenca	-1,{OnPCLoginEvent:	while ( !getstatus(SC_JAILED) ) {		if ( checkvending() || checkchatting() || checkidle() >= .sleeploop / 1000 ) {			.@afk++;			if ( .@afk >= .afk && ( .@afk % .afk == 0 ) ) {				dispbottom "[AccessRO]: Voce esta Ausente por "+( .@afk * .sleeploop / 1000 )+" segundos";				.@tick = 0;			}		}		else {			.@afk = 0;			.@tick++;			if ( .@tick >= .tick ) {				dispbottom "Voce ganhou 1 Moeda Mythril por estar ativo por mais que "+( .@tick * .sleeploop / 1000 )+" seconds";				getitem 674,1;				.@tick = 0;			}		}		sleep2 .sleeploop;	}	end; // shouldn't reachOnInit:	.sleeploop = 5000; // every 5 seconds	.tick = 10; // loop 6 times of 5 seconds == 30 seconds	.afk = 2; // loop 3 times of 5 seconds = 10 seconds	end;}
Edited by Broker

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
OnInit:    .sleeploop = 60000; // 1 minute    .tick = 60; // recieve every - 60 minutes     .afk = 1; // idle check - 1 minuteend;}
Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

Thank u @leloush , now i just need to make the NPC Shop. That is possible to exchange like 15 Mythril Coins (674) for 1 selected bro headgear on npc.

Share this post


Link to post
Share on other sites
  • 0

a normal bro equip like 

 

Hat of the Sun God [0]

Elven Sunglasses [1] etc..

Here's the Shop

prontera,150,150,1	trader	HeadgearShop	952,{	OnInit:	tradertype(NST_CUSTOM);	sellitem Helm_Of_Sun,15;   //Sell for 15MC	sellitem Elven_Sunglasses,15;	end;	/* allows currency to be Red_Potion */OnCountFunds:	setcurrency(countitem(Mithril_Coin));	end;/* receives @price (total cost) */OnPayFunds:	if( countitem(Mithril_Coin) < @price )		end;	delitem Mithril_Coin,@price;	purchaseok();	end;}

you can add more items below sellitem command.

Share this post


Link to post
Share on other sites
  • 0

Thank u, working perfectly. But my equipments are without description, how can i fix it?

Get an Updated Data Folder.

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
Answer this question...

×   Pasted as rich text.   Restore formatting

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.