Jump to content
  • 0

Multiple Treasure Summoner


Valcars

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   0
  • Joined:  01/03/16
  • Last Seen:  

Hi, I have a problem with a modified script from me, in practice the script works, however the problem is that the event which starts OnMinute30 :, does not release the items and does not announce when killed the treasure. I do not know if I was clear enough, sorry for my english

prontera,124,197,7	script	Treasure Box Summoner	856,{
	mes "[ Treasure Box Event ]";
	mes "Hello! I'm trying to improve my ability to summon monsters.. and by doing so, I've been refining on how to summon Treasure Boxes.";
        if( $@tboxevent == 0 )
		{
        	mes "Sadly, I've ^ff0000failed^000000 to summon last time.";
		} 
		else 
		{
        	mes "I was able to successfully summon last time!";
		}
		if( $@tboxsevent == 0 ){
        	mes "Sadly, I've ^ff0000failed^000000 to summon last time.";
		} 
		else 
		{
        	mes "I was able to successfully summon last time!";
		}
	close;

OnMinute00: // Change to whatever you want the event to start
	set $@tboxevent, rand(2);
	if ( $@tboxevent != 0 ){
		announce "A rare Treasure Box will be spawned in 30 seconds in Prontera.",0;
		sleep2 30000;
		monster "prontera",0,0,"Treasure Box",1845,10,"Treasure Box Summoner::OnTBoxKilled";
		end;
	} else {
		end;
	}
	end;

OnTBoxKilled:
	announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
	getitem 7539,1; // Change your prize here
	end;
	
	
OnMinute30: // Change to whatever you want the event to start

	set $@ran, rand(1,9);
	if ($@ran == 9) set $@jmpmap$,"hugel";
	if ($@ran == 8) set $@jmpmap$,"yuno";
	if ($@ran == 7) set $@jmpmap$,"comodo";
	if ($@ran == 6) set $@jmpmap$,"aldebaran";
	if ($@ran == 5) set $@jmpmap$,"izlude";
	if ($@ran == 4) set $@jmpmap$,"payon";
	if ($@ran == 3) set $@jmpmap$,"geffen";
	if ($@ran == 2) set $@jmpmap$,"morocc";
	if ($@ran == 1) set $@jmpmap$,"prontera";

	set $@tboxsevent, rand(2);
	if ( $@tboxsevent != 0 ){
		announce "A rare Treasure Box will be spawned in 30 seconds in "+$@jmpmap$+" .",0;
		sleep2 80000;
		monster $@jmpmap$,0,0,"Treasure Box",1845,5,"Treasure Summoner::OnTBoxsKilled";
		end;
	} else {
		end;
	}
	end;

OnTBoxsKilled:
	announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
	getitem 50040,1; // Change your prize here
	end;
	
}

Where did I wrong?

Edited by Valcars
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Were there any map server errors during execution of the script? Perhaps during the spawning of the treasure box maybe?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   0
  • Joined:  01/03/16
  • Last Seen:  

No, the treasure box is successfully created, the only error is that not drop the items and does not announce when killed the treasure box.

 

I tried to put this script only, and so it works properly

//===== Mysterious Script ====================================
//= Treasure Hunter
//===== By: ==================================================
//= ARTHistic, Mysterious
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= Hercules, rAthena
//===== Description: =========================================
//= NPC summons a treasure box and players will have to find it
//= and kill it.
//===== Additional Comments: =================================
//= v1.0 - First release [ARTHistic]
//= v1.1 - Just fixed credits [Mysterious]
//= v1.2 - Little bit more information [Mysterious]
//===== TODO: ================================================
// OPTIMIZE MORE
//============================================================

prontera,122,188,5	script	Argo	81,{

	


	mes "[Argo]";
	mes "Hello! I'm trying to improve my ability to summon monsters.. and by doing so, I've been refining on how to summon Treasure Boxes.";
        if( $@tboxsevent == 0 ){
        	mes "Sadly, I've ^ff0000failed^000000 to summon last time.";
	} else {
        	mes "I was able to successfully summon last time!";
	}
	close;



OnMinute30: // Change to whatever you want the event to start

	set $@ran, rand(1,9);
	if ($@ran == 9) set $@jmpmap$,"hugel";
	if ($@ran == 8) set $@jmpmap$,"yuno";
	if ($@ran == 7) set $@jmpmap$,"comodo";
	if ($@ran == 6) set $@jmpmap$,"aldebaran";
	if ($@ran == 5) set $@jmpmap$,"izlude";
	if ($@ran == 4) set $@jmpmap$,"payon";
	if ($@ran == 3) set $@jmpmap$,"geffen";
	if ($@ran == 2) set $@jmpmap$,"morocc";
	if ($@ran == 1) set $@jmpmap$,"prontera";

	set $@tboxsevent, rand(2);
	if ( $@tboxsevent != 0 ){
		announce "A rare Treasure Box will be spawned in 30 seconds in "+$@jmpmap$+" .",0;
		sleep2 80000;
		monster $@jmpmap$,0,0,"Treasure Box",1845,5,"Treasure Summoner::OnTBoxsKilled";
		end;
	} else {
		end;
	}
	end;

OnTBoxsKilled:
	announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
	getitem 50040,1; // Change your prize here
	end;
}

but I need to use them both.
But when I use them I always make the same mistake.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Can you try to @item 50040? I think someone had trouble with item IDs past 50k.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   0
  • Joined:  01/03/16
  • Last Seen:  

I tried it and the item is successfully created with @item, sir I tried to create two files one I called treasure.txt and it is this:

prontera,124,197,7	script	Treasure Box Summoner	856,{
	mes "[ Treasure Box Event ]";
	mes "Hello! I'm trying to improve my ability to summon monsters.. and by doing so, I've been refining on how to summon Treasure Boxes.";
        if( $@tboxevent == 0 ){
        	mes "Sadly, I've ^ff0000failed^000000 to summon last time.";
	} else {
        	mes "I was able to successfully summon last time!";
	}
	close;

OnMinute00: // Change to whatever you want the event to start
	set $@tboxevent, rand(2);
	if ( $@tboxevent != 0 ){
		announce "A rare Treasure Box will be spawned in 30 seconds in Prontera.",0;
		sleep2 30000;
		monster "prontera",0,0,"Treasure Box",1845,10,"Treasure Box Summoner::OnTBoxKilled";
		end;
	} else {
		end;
	}
	end;

OnTBoxKilled:
	announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
	getitem 7539,1; // Change your prize here
	end;

and the second file is trasuere2.txt

prontera,122,188,5	script	Argo	81,{

	


	mes "[Argo]";
	mes "Hello! I'm trying to improve my ability to summon monsters.. and by doing so, I've been refining on how to summon Treasure Boxes.";
        if( $@tboxsevent == 0 ){
        	mes "Sadly, I've ^ff0000failed^000000 to summon last time.";
	} else {
        	mes "I was able to successfully summon last time!";
	}
	close;



OnMinute30: // Change to whatever you want the event to start

	set $@ran, rand(1,9);
	if ($@ran == 9) set $@jmpmap$,"hugel";
	if ($@ran == 8) set $@jmpmap$,"yuno";
	if ($@ran == 7) set $@jmpmap$,"comodo";
	if ($@ran == 6) set $@jmpmap$,"aldebaran";
	if ($@ran == 5) set $@jmpmap$,"izlude";
	if ($@ran == 4) set $@jmpmap$,"payon";
	if ($@ran == 3) set $@jmpmap$,"geffen";
	if ($@ran == 2) set $@jmpmap$,"morocc";
	if ($@ran == 1) set $@jmpmap$,"prontera";

	set $@tboxsevent, rand(2);
	if ( $@tboxsevent != 0 ){
		announce "A rare Treasure Box will be spawned in 30 seconds in "+$@jmpmap$+" .",0;
		sleep2 80000;
		monster $@jmpmap$,0,0,"Treasure Box",1845,5,"Treasure Summoner::OnTBoxsKilled";
		end;
	} else {
		end;
	}
	end;

OnTBoxsKilled:
	announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
	getitem 50040,1; // Change your prize here
	end;
}
 
basically if you use only one script at a time it works without problems, but if you use them both gives me the problem always the script trasure2.txt
I repeat the item is successfully created both @item getitem with that, the problem comes when you use them together.
 
I just can not understand what the problem is ... :(
Edited by Valcars
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...