Jump to content
  • 0
minx123

Help fix this script other one town invasion

Question

//===== hercules Script =============================================================================================//= Invasion//===== Created By: =================================================================================================//= ZelosAvalon//===== Current Version: ============================================================================================//= v1.3//===== Compatible With: ============================================================================================//= TXT & SQL//===== Credits: ====================================================================================================//= Mysterious//==== Information: =================================================================================================// Keep in mind that the prize amount that is given out is 5 <of the item ID you input> in the NPC.// With knowledge, you can change it to whatever you want the prize to be (I.e. cashpoints, etc.).//===================================================================================================================invek,107,212,3	script	Event Invasion	105,{function Go;set .GM,50;//GM Level to access the GM Menu. Default: 50function Go {	warp getarg(0),getarg(1,0),getarg(2,0);	end; }	// GM menu 	//It allows GMs Level 50 or more to Start and Stop invasions.	if (getgmlevel()>.GM) {		if (.mobs_left) {			mes "[Event Invasion]";			mes "An invasion is in progress..";			mes "Location: " + .map$;			mes "^FF0000" +.mobs_left+ "^000000" + getmonsterinfo(.MobID,0) + " left ";			mes " ";			mes "Stop invasion?";			if(select("No:Yes")==1) close;			donpcevent "Event Invasion::OnTimer1805000";			mes "Invasion stopped";			announce "The Invasion has been stopped by "+strcharinfo(0),bc_all;			close;		}		mes "[Event Invasion]";		mes "Please customize the Invasion event before starting it.";		mes "Note - The MVP drops a event item.";		Main:		next;		mes "[Event Invasion]";			switch(select("Map:MVP [" + getmonsterinfo(.MvpID,0) + "]:Item [" + getitemname(.ItemID) + "]:Monster [" + getmonsterinfo(.MobID,0) + "]:Number of Monster:Start Event")) {		case 1:			mes "Map for Invasion?";			mes "Please input the Map Name:";			menu	"Prontera",T1, "Alberta",T2, "Aldebaran",T3, "Amatsu",T4, "Ayothaya",T5,			"Brasilis",T6, "Comodo",T7, "Dewata",T8, "Eclage",T9, "Einbech",T10, 			"Einbroch",T11, "El Dicastes",T12, "Geffen",T13, "Gonryun",T14, "Hugel",T15,			"Izlude",T16, "Jawaii",T17, "Lighthalzen",T18, "Louyang",T19, "Lutie",T20,			"Malangdo",T21, "Malaya",T22, "Manuk",T23, "Midgarts Expedition Camp",T24,			"Mora",T25, "Morroc",T26, "Moscovia",T27, "Nameless Island",T28,			"Niflheim",T29, "Payon",T30, "Rachel",T31, "Splendide",T32, "Thor Camp",T33,			"Umbala",T34, "Veins",T35, "Yuno",T36;			T1: Go("prontera");			T2: Go("alberta");			T3: Go("aldebaran");			T4: Go("amatsu");			T5: Go("ayothaya");			T6: Go("brasilis");			T7: Go("comodo");			T8: Go("dewata");			T9: Go("ecl_in01");			T10: Go("einbech");			T11: Go("einbroch");			T12: Go("dicastes01");			T13: Go("geffen");			T14: Go("gonryun");			T15: Go("hugel");			T16: Go("izlude");			T17: Go("jawaii");			T18: Go("lighthalzen");			T19: Go("louyang");			T20: Go("xmas");			T21: Go("malangdo");			T22: Go("malaya");			T23: Go("manuk");			T24: Go("mid_camp");			T25: Go("mora");			T26: Go("morocc");			T27: Go("moscovia");			T28: Go("nameless_n");			T29: Go("niflheim");			T30: Go("payon");			T31: Go("rachel");			T32: Go("splendide");			T33: Go("thor_camp");			T34: Go("umbala");			T35: Go("veins");			T36: Go("yuno");			goto Main;		case 2:			mes "What MVP would you like to summom?";			mes "Please input the MVP ID:";			input .MvpID;			goto Main;		case 3:			mes "Which item would you like the MVP to drop?";			mes "Please input the amount of monster you want to summon:";			input .ItemID;			goto Main;		case 4:			mes "What monster would you like to summom ?";			mes "Please input the Monster ID:";			input .MobID;			goto Main;		case 5:			mes "Who many monster would you like to summom ?";			mes "Please input the item ID:";			input .MobX;			goto Main;		case 6:			mes "Starting the event now...";			close2;			goto OnStart;	}		// If a player clicks the NPC, it displays:		mes "[Event Invasion]";	mes .mobs_left+" have invaded "+.map$[.rand_map]+"!";	close;				/////////////////////////			//The actual NPC Script//			/////////////////////////OnClock0840:OnClock1440:OnClock2040:OnClock0240: // Change this to your likingOnStart:	set .mobs_left, .MobX;	sleep2 1000;	set $@ran, rand(1,2);	if ($@ran == 2) set .map$,"izlude";	if ($@ran == 1) set .map$,"geffen";	sleep2 1000;	announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .map$ + "!", bc_all;	sleep2 5000;	announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these "+getmonsterinfo(.MobID,0)+"!", bc_all;	set .mobs_left, .MobX;	monster .map$,0,0,getmonsterinfo(.MobID,0) +" [Event] ",.MobID,.MobX,strnpcinfo(3) + "::OnMyMobDead";	end;		OnTimer1805000:	// 30 minutes later, kills all the mobs.	killmonster .map$,"Event Invasion::OnMyMobDead";	set .mobs_left,0;OnStop: // When the event is stopped by a GM, or all monsters dead.	killmonster .map$,strnpcinfo(3) + "::OnMyMobDead";	killmonster .map$,strnpcinfo(3) + "::OnSpecialMobDead";	announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;	end;OnMyMobDead: //When a Monster is killed	set .mobs_left, .mobs_left-1;	if (.mobs_left==0) {		announce "[ Rune-Midgard Guard ]: "+getmonsterinfo(.MvpID,0)+" has spawned in " + .map$ + "!", bc_all;		monster .map$,0,0,getmonsterinfo(.MvpID,0),.MvpID,1,"Event Invasion::OnSpecialMobDead";	} else {		set #Event_point, #Event_point + 1;		announce "["+.mobs_left+"/"+.MobX+"] Monster left.",bc_map;	}	end;OnSpecialMobDead:		set #Event_point, #Event_point + 10;		announce strcharinfo(0)+" has fought off the "+ getmonsterinfo(.MobID,0) +" Invasion and has been awarded a worthy prize!", bc_all;		getitem .ItemID,1;		donpcevent "Event Invasion::OnStop";	}	end;}

how to set permanent MVP, ITEM,MONSTER,QUANTITY MONSTER.

every time i reloadscript it will reset to all null.

 

i need set to

 

MVP = 1502

ITEM = 7227

MONSTER = 2534

QUANTITY MONSTER = 5

Edited by minx123

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
"."      - A NPC variable.
           They exist in the NPC and disappear when the server restarts or 
           the NPC is reloaded. Can be accessed from inside the NPC or by 
           calling 'getvariableofnpc'. Function objects can also have 
           .variables which are accessible from inside the function, 
           however 'getvariableofnpc' does NOT work on function objects.
 
In your herc folder look under doc/script_commands.txt line 438 starts the variable explanation.
 
That script is using .mvpid .itemid and so on. Look in that document for a more appropriate way of setting the variable. A lot of people here could just give you the answer but I think you will find it a lot more rewarding if you figure it out your self, just use replace all in notepad++
 
If you can't figure it out then let us know, if you do figure it out also let us know :D

Share this post


Link to post
Share on other sites
  • 0

 

"."      - A NPC variable.
           They exist in the NPC and disappear when the server restarts or 
           the NPC is reloaded. Can be accessed from inside the NPC or by 
           calling 'getvariableofnpc'. Function objects can also have 
           .variables which are accessible from inside the function, 
           however 'getvariableofnpc' does NOT work on function objects.
 
In your herc folder look under doc/script_commands.txt line 438 starts the variable explanation.
 
That script is using .mvpid .itemid and so on. Look in that document for a more appropriate way of setting the variable. A lot of people here could just give you the answer but I think you will find it a lot more rewarding if you figure it out your self, just use replace all in notepad++
 
If you can't figure it out then let us know, if you do figure it out also let us know :D

ooo.. thank you.. now i know can read at there.. hahha..

 

 

set default value on the OnInit label

thank you

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.