Jump to content
  • 0

Multi monster and prize?


dtw619

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/14/13
  • Last Seen:  

How could i add more than one monster and more than one prize? this is and edited Find the mushroom. i've tried a few methods but nothing.

 

que_moon,158,19,6	script	Poring Invasion	1894,{
	mes "[ Poring Event ]";
	if (!.Status)
		mes "There is no event at the moment!";
	else {
		mes "There are "+.Spawn+" Porings left in "+.Map$+"!";
		mes "Find and kill the Porings to gain "+getitemname(.Prize)+"!";
	}
	if (.Status || getgmlevel() < .GM) close;
	mes "Start the event?";
	next;
	if(select("- No:- Yes") == 1) close;
	donpcevent strnpcinfo(0)+"::OnMinute10";
	mes "[ Pouring Event ]";
	mes "Event started!";
	close;

OnInit:
	set .Prize,7539;	// Reward item ID
	set .Amount,10;	// Reward item amount
	set .GM,60;	// GM level required to access NPC
	setarray .Maps$[0],"izlude","geffen","morocc","prontera"; // Possible maps
	end;

OnMinute10:	// Start time (every hour)
	if (.Status) end;
	set .Status,1;
	set .Spawn,rand(1,10);	// How many Mushrooms should spawn?
	set .Map$,.Maps$[rand(getarraysize(.Maps$))];
	killmonster .Map$,"All";
	monster .Map$,0,0,"Please don't kill me!",1894  ,.Spawn,strnpcinfo(0)+"::OnMobKilled";
	announce "A Pouring Event has Begun!! : Total of "+.Spawn+" Event Pourings have been spawned in "+.Map$+"!",0;
	sleep 2500;
	announce "[Server] : Every Pouring you kill will give you "+getitemname(.Prize)+"!",0;
	end;

OnMobKilled:
	set .Spawn, .Spawn - 1;
	getitem .Prize, .Amount;
	if (.Spawn) announce "[ "+strcharinfo(0)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
	else {
		announce "The Pouring Event has ended. All the Pourings have been killed.",0;
		set .Status,0;
	}
	end;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  390
  • Reputation:   27
  • Joined:  07/12/12
  • Last Seen:  

try this.

 

set .Prize,7539,505;    // Reward item ID
    set .Amount,10,10;    // Reward item amount
    set .GM,60;    // GM level required to access NPC
    setarray .Maps$[0],"izlude","geffen","morocc","prontera"; // Possible maps
    end;

 

no guarantee this will work tho, but try it.

Link to comment
Share on other sites


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

set .Prize,7539,505;    // Reward item ID
set .Amount,10,10;    // Reward item amount

You must define an array variable when you use it

 

setarray .Prize,7539,505;    // Reward item ID
setarray .Amount,10,10;    // Reward item amount

 

 

In the end of the script, make a loop to give all items.

for ( .@i = 0; .@i < getarraysize( .Prize ); .@i++ )
	getitem .Prize[.@i], .Amount[.@i];

 

instead of

getitem .Prize, .Amount;
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...