Jump to content
  • 0

MVP Attack


Kiro

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  06/10/12
  • Last Seen:  

//============================================================
//= Auto MVP Summoner
//===== By: =======================Modified By:=========
//= xMachina / Acetito	  Emistry
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= eA SVN 5000+
//===== Additional Comments: =================================
//= v1.0 Testing Mode
//============================================================


prontera,147,164,5 script MVP Attack 437,{
mes "[ ^0065DFxMachina^000000 ]";
if(getgmlevel() < 20) {
if(!.Event) mes "There is no MVP Attack Event now.";
else {
mes "There is a MVP Attack Event on now!";
mes "Location: " + $@Map$;
mes "Special MVP: " + $@SpecialMVP;
mes "Normal MVP: " + $@NormalMVP;
}
close;
}

Main:
mes "Please customize the MVP Attack Event:";
while(1){
switch(select("Item ["+getitemname($@ItemID)+" x "+$@Amount+"]:Location [" + $@Map$ + "]:MVP [special "+$@SpecialMVP+" |Normal "+$@NormalMVP+"]:Start/END Event")) {
Case 1:
mes "What item to be given to MVP Killer ?";
next;
do{
message strcharinfo(0),"Enter a VALID itemID. Example 501 - Red Potion.";
input $@ItemID,501,32767;
}while( getitemname( $@ItemID ) == "null" );
mes "Input the Amount of Item to be Rewarded for Special MVP Killer.";
input $@Amount,1,30000;
next;
break;
Case 2:
mes "Which map would you like me to host this event?";
mes "Input a ^FF0000VALID^000000 mapname.";
do{
message strcharinfo(0),"Enter a VALID mapname . Example : prt_maze02";
input $@Map$;
next;
break;
Case 3:
mes "How many ^FF0000Special^000000 MVP would you like me to summon?";
input $@SpecialMVP;
next;
mes "How many ^FF0000Normal^000000 MVP would you like me to summon?";
input $@NormalMVP;
dispbottom "Special MVP = "+$@SpecialMVP+"   and   Normal MVP = "+$@NormalMVP+" ";
next;
break;
Case 4:
mes "Please make sure your have do the Correct Configuration.";
next;
break;
}
if( !.Event ){
mes "Starting the event now...";
set .Event,1;
monster $@Map$,0,0,"--ja--",-3,$@SpecialMVP,strnpcinfo(3)+"::OnSpecialKill";
monster $@Map$,0,0,"--ja--",-3,$@NormalMVP,strnpcinfo(3)+"::OnNormalKill";
announce "Map Invasion Begin : "+$@SpecialMVP+" Special MVP has invaded in "+$@Map$+". Hurry Up..",0,0x98FB98;
}else{
mes "Ending the event now...";
announce "The MVP Attack Event is now over!",0,0x98FB98;
killmonster $@Map$,"All";
set .Event,0;
}
close;
}
}

OnSpecialKill:
announce "["+strcharinfo(0)+"] has killed 1 Special MVP and Gained Mystery Items .  Left "+mobcount($@Map$,strnpcinfo(3)+"::OnSpecialKill")+" Special MVP.",0;
getitem $@ItemID,$@Amount;
if( mobcount( $@Map$,strnpcinfo(3)+"::OnSpecialKill" ) == 0 ){ announce "The MVP Attack Event is now over!",0,0x98FB98;
killmonster $@Map$,"All";
set .Event,0;
}
end;

OnNormalKill:
dispbottom "You killed Normal MVP ( No Reward ).  Special MVP Left : "+mobcount($@Map$,strnpcinfo(3)+"::OnSpecialKill")+" .";
end;

OnClock0000:
OnClock0400:
OnClock0800:
OnClock1200:
OnClock1600:
OnClock2000:
announce "MVP Invasion Event Failed due to MisConfiguration of Event. Please Report to Staffs.",0;
end;
}
set .Event,1;
monster $@Map$,0,0,"--ja--",-3,$@SpecialMVP,strnpcinfo(3)+"::OnSpecialKill";
monster $@Map$,0,0,"--ja--",-3,$@NormalMVP,strnpcinfo(3)+"::OnNormalKill";
announce "Map Invasion Begin : "+$@SpecialMVP+" Special MVP has invaded in "+$@Map$+". Hurry Up..",0,0x98FB98;
end;
}

Need help on this script...Emistry gave me instructions on how to fix it..but i can't seem to find the solution..end up stuck within the code :)

Problem:

1.tried to remove the "special mvp" = error

2.tried to click on the appeared npc..no response :(

Thanks in Advance ya ^.^

Edited by Kiro
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  107
  • Reputation:   91
  • Joined:  01/19/12
  • Last Seen:  

Try to post your script here: http://upaste.me

It's very hard to read a script posted directly in a post using CODE.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  107
  • Reputation:   91
  • Joined:  01/19/12
  • Last Seen:  

Well, here is your script working, i made several changes to make it work.

http://pastebin.com/mV66ZAPN

I recommend you to writing scripts with indentation, a program friendly to read is easy to read and less buggy.

The OnClock parts of the script will not work if you don't change the script and validate that the proper information is there before try to start the event, try to write these validations.

Regards,

Myzter

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