Jump to content
  • 0

Gold room concept request


zmref

Question


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

I want a gold room that has a random spawning treasure box in it when I click it there will be a loading bar then after the loading bar finishes you will now receive a mithril coin. pls pls pls! thanks! I only imagined this but I don't know how to do it lol

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   13
  • Joined:  11/14/11
  • Last Seen:  

I hope this can help you,

It should works as you wanted to.

It's only shows one Treasure Chest, but you can make NPC Duplicates to "increase" the numer of chest.

By default, it appears on prontera at 155,155, then once you had taken the coin, the chest warps to other place.

I might make a more elaborated version.

But for now, there you have it.

TreasureChest.txt

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

No need global temporary variable here. Just to point it out.

/*

Programed by:	Miles Reginal

Version 1.0
• An NPC that spawns has a treasure chest.
• After taking the treasure, it spawns in another place
• Fixed the error in which the Chest can spawn on Non-Walkable place

*/

prontera,155,155,5	script	Treasure Chest	1902,{

progressbar "", .waiting_time;
getitem .treasure_reward, 1;
while( 1 ) {
	set .@x, rand(1,250);
	set .@y, rand(1,250);
	sleep 1;
	if( checkcell("prontera",.@x,.@y,cell_chkpass) )
		break;
}
movenpc "Treasure Chest",.@x,.@y;
end;

OnInit:
set .waiting_time, 20;		//Time needed to get the treasure
set .treasure_reward, 674;	//Reward that you get after opened the treasure
end;
}

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

I hope this can help you,

It should works as you wanted to.

It's only shows one Treasure Chest, but you can make NPC Duplicates to "increase" the numer of chest.

By default, it appears on prontera at 155,155, then once you had taken the coin, the chest warps to other place.

I might make a more elaborated version.

But for now, there you have it.

I made a duplicate but it wasn't randomly moving it's still on its own position

only the main one was moving when I click the duplicate or even the main one.

cause I'm planning to make more treasure chest in 1 small map

/*
Programed by: Miles Reginal
Version 1.0
An NPC that spawns has a treasure chest.
After taking the treasure, it spawns in another place
Fixed the error in which the Chest can spawn on Non-Walkable place
Version 2.0 by Zmref
Duplicates not working so I add 2nd NPC with different variables and names.
*/
prontera,155,155,5 script Treasure Chest 1902,{

progressbar "", .waiting_time;
getitem .treasure_reward, 1;
while( 1 ) {
 set .@x, rand(150,160);
 set .@y, rand(140,160);
 sleep 1;
 if( checkcell("prontera",.@x,.@y,cell_chkpass) )
  break;
}
movenpc "Treasure Chest",.@x,.@y;
end;

OnInit:
set .waiting_time, 5;  //Time needed to get the treasure
set .treasure_reward, 674; //Reward that you get after opened the treasure
end;
}
prontera,152,152,5 script Treasure Chest#1 1902,{
progressbar "", .waiting_time;
getitem .treasure_reward, 1;
while( 1 ) {
 set .@a, rand(150,160);
 set .@b, rand(140,160);
 sleep 1;
 if( checkcell("prontera",.@a,.@b,cell_chkpass) )
  break;
}
movenpc "Treasure Chest#1",.@a,.@b;
end;
OnInit:
set .waiting_time, 5;  //Time needed to get the treasure
set .treasure_reward, 674; //Reward that you get after opened the treasure
end;
}

What I did to your script was this to make it work lol

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   13
  • Joined:  11/14/11
  • Last Seen:  

I didn't know what happened, because it worked perfectly for me.

Anyways, modified again. Try it, you can add the adding, changing the number after the #:

prontera,0,0,5 duplicate(Treasure Chest) Treasure Chest#2 1902

@Capuche:

No need global temporary variable here. Just to point it out.

Thanks for the suggestion. Added to the credits!

TreasureChest v1.1.txt

Edited by Miles
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

I didn't know what happened, because it worked perfectly for me.

Anyways, modified again. Try it, you can add the adding, changing the number after the #:

prontera,0,0,5 duplicate(Treasure Chest) Treasure Chest#2 1902

@Capuche:

No need global temporary variable here. Just to point it out.

Thanks for the suggestion. Added to the credits!

can you make the treasure chest to spawn 10 box every hour?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Sir can you edit the same script. GM will whisper a npc and the game will start for 1 round only, then I will input the item and amount ingame. after 1 round it will reset and I will again put the item and amount if I want to start it again.The treasure box is in prontera 155 155 hiding then it will appear when the GM start the event.It will announce the person who get the prize item.

NVM, I found something close to this.

Edited by maynard
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...