Advertisement
Skorm

MVP Spawner NO ITEMS

Apr 15th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.48 KB | None | 0 0
  1. prontera,96,96,2    script  MVP Spawner 66,{
  2. if(getgmlevel()<.gmlevel) end;
  3. set .@MVPID,-3;
  4. L_Menu:
  5.     mes .NPC$;
  6.     mes "Select an option from the menu below and click [^0000FFSummon!^000000] when you're done.";
  7.     next;
  8.     if(.@MVPID==-3){ set .@tmp$,"Random MVP"; } else { set .@tmp$,getmonsterinfo(.@MVPID,0); }
  9.     Switch(select("MonsterID(^0000FF"+.@tmp$+"^000000):MapName(^0000FF"+.@MAPNAME$+"^000000):Amount(^0000FF"+.@AMOUNT+"^000000):[^0000FFSummon!^000000]")){
  10.         case 1:
  11.             mes .NPC$;
  12.             mes "Input the id of the monster you'd like to spawn.";
  13.             next;
  14.             input(.@MVPID);
  15.             while(!query_sql("(SELECT `ID` from `mob_db` where `ID` = "+.@MVPID+") UNION ALL (SELECT `ID` from `mob_db2` where `ID` = "+.@MVPID+" LIMIT 1);",.@a)){
  16.                 input(.@MVPID);
  17.             } goto L_Menu;
  18.         case 2:
  19.             mes .NPC$;
  20.             mes "Input the name of the map you'd like to spawn the monster on.";
  21.             next;
  22.             input(.@MAPNAME$);
  23.             while(mobcount(.@MAPNAME$,"all")==-1){
  24.                 input(.@MAPNAME$);
  25.                 if(mobcount(.@MAPNAME$,"all")!=-1){
  26.                     mes "Would you like to spawn "+(.@MVPID==-3?"Random MVPs":getmonsterinfo(.@MVPID,0))+" on the map "+.@MAPNAME$+"?";
  27.                     next;
  28.                     if(select("Yes:No")-1) { set .@MAPNAME$,""; continue; } else { break; }
  29.                 }
  30.             } goto L_Menu;
  31.         case 3:
  32.             mes .NPC$;
  33.             mes "Input the amount you'd like to spawn.";
  34.             mes "(Maximum "+.Lamount+")";
  35.             next;
  36.             input(.@AMOUNT);
  37.             while(.@AMOUNT<=0||.@AMOUNT>.Lamount){
  38.                 input(.@AMOUNT);
  39.                 if(.@AMOUNT>0&&.@AMOUNT<=.Lamount){
  40.                     mes "Would you like to spawn "+.@AMOUNT+" monsters?";
  41.                     next;
  42.                     if(select("Yes:No")-1) { set .@AMOUNT,0; continue; } else { break; }
  43.                 }
  44.             } goto L_Menu;
  45.         case 4:
  46.             if(mobcount(.@MAPNAME$,"all")==-1||.@AMOUNT<=0){
  47.                 if(!.fiesta){
  48.                     mes .NPC$;
  49.                     mes "I'm sorry you need to fillout all the fields before summoning a monster!";
  50.                     next;
  51.                     goto L_Menu;
  52.                 } else {
  53.                     if(mobcount(.@MAPNAME$,"all")==-1) set .@MAPNAME$,"this";
  54.                     if(.@AMOUNT<=0) set .@AMOUNT,.fiesta;
  55.                 }
  56.             }
  57.             if(.Mamount){
  58.                 if(mobcount(.@MAPNAME$,"MVP Spawner::OnMVPDeath")+.@AMOUNT>.Mamount&&.Mamount>0){
  59.                     mes .NPC$;
  60.                     mes "I'm sorry but there can only be "+.Mamount+" MVPs in one map.";
  61.                     set .@tmp,.Mamount-mobcount(.@MAPNAME$,"MVP Spawner::OnMVPDeath");
  62.                     if(.@tmp>0){
  63.                         mes "Would you like to spawn "+.@tmp+" instead?";
  64.                         if(select("Yes:No")-1) { mes "Ok!"; close; }
  65.                         announce "GM-"+strcharinfo(0)+" summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
  66.                         monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@tmp,"MVP Spawner::OnMVPDeath";
  67.                         close;
  68.                     }
  69.                     next;
  70.                     goto L_Menu;
  71.                 }
  72.             }
  73.             announce "GM-"+strcharinfo(0)+" summoned "+.@AMOUNT+" "+.@tmp$+"(s) in "+(.@MAPNAME$=="this"?strcharinfo(3):.@MAPNAME$)+".",bc_all,"0x"+.fontcolor$;
  74.             monster .@MAPNAME$,0,0,"--ja--",.@MVPID,.@AMOUNT,"MVP Spawner::OnMVPDeath";
  75.             close;
  76.     }
  77. end;
  78. OnMVPDeath:
  79. end;
  80. OnInit:
  81. //=-=-=-=-=-=Configuration=-=-=-=-=-=
  82. set .NPC$,"[^0000FFFrankie^000000]"; // Npc Name
  83. set .gmlevel,50; //Minimum Gm level allowed to spawn MVPS.
  84. set .fiesta,5; // If enabled will spawn that many random MVPs on the players map if no other information is provided! (Off=0) Will bypass Maximum amount!
  85. set .fontcolor$,"FFCE00"; // Hexi color text is announced in.
  86. set .Lamount,5; // Maximum amount of mvps that can be spawned at once.
  87. set .Mamount,5; // Maximum amount of mvps on one map at a time. (Off=0)
  88. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement