summaryrefslogtreecommitdiff
path: root/npc/commands/event.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-10 17:44:45 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-10 17:44:45 -0300
commitce7f01a5d77823f808bb477c6f473a0c0312dd08 (patch)
tree21d87b030b2a0ca41c526ab0f2cbca0db161fcbc /npc/commands/event.txt
parentb07003fa35288a74436d7f5f08a26eb401085180 (diff)
downloadserverdata-ce7f01a5d77823f808bb477c6f473a0c0312dd08.tar.gz
serverdata-ce7f01a5d77823f808bb477c6f473a0c0312dd08.tar.bz2
serverdata-ce7f01a5d77823f808bb477c6f473a0c0312dd08.tar.xz
serverdata-ce7f01a5d77823f808bb477c6f473a0c0312dd08.zip
Experimental: Super Boss Spawn
Diffstat (limited to 'npc/commands/event.txt')
-rw-r--r--npc/commands/event.txt145
1 files changed, 144 insertions, 1 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index b71833f43..de1b1483b 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -125,6 +125,147 @@ function script GlobalEventMenu {
return;
}
+ // :>
+ function superSpawn {
+ mesc l("Monster ID, 0 to cancel");
+ input .@mobid;
+ if (.@mobid <= 0)
+ return;
+ //.@tmp=strmobinfo(4, .@mobid);
+ .@tmp=getmonsterinfo(.@mobid, MOB_MAXHP);
+ mesc l("Monster HP, Default %d, use 0 to cancel", .@tmp);
+ input .@newhp;
+ if (.@newhp <= 0)
+ return;
+
+ .@tmp=(getmonsterinfo(.@mobid, MOB_ATK1)+getmonsterinfo(.@mobid, MOB_ATK2))/2;
+ mesc l("Monster ATK (varies 10%), Default %d, use 0 to cancel", .@tmp);
+ input .@newak;
+ if (.@newak <= 0)
+ return;
+ .@minatk=.@newak*9/10;
+ .@maxatk=.@newak*11/10;
+
+ .@tmp=getmonsterinfo(.@mobid, MOB_DEF);
+ mesc l("Monster DEF, Default %d, use 0 to cancel", .@tmp);
+ input .@newdf;
+ if (.@newdf <= 0)
+ return;
+
+ .@tmp=getmonsterinfo(.@mobid, MOB_DEX);
+ mesc l("Monster DEX, Default %d, use 0 to cancel", .@tmp);
+ input .@newdx;
+ if (.@newdx <= 0)
+ return;
+
+ .@tmp=getmonsterinfo(.@mobid, MOB_AGI);
+ mesc l("Monster AGI, Default %d, use 0 to cancel", .@tmp);
+ input .@newag;
+ if (.@newag <= 0)
+ return;
+
+ .@tmp=getmonsterinfo(.@mobid, MOB_RANGE);
+ mesc l("Monster ATK RANGE, Default %d, use 0 to cancel", .@tmp);
+ input .@newrg;
+ if (.@newrg <= 0)
+ return;
+
+ mesc l("Monster SPEED, Player speed is 150, minimum is 100!");
+ input .@newspd;
+ if (.@newspd < 100)
+ return;
+
+ .@tmp$=strmobinfo(1, .@mobid);
+ mesc l("Monster NAME, Default %s, empty to cancel", .@tmp$);
+ input .@name$;
+ if (.@name$ == "")
+ return;
+
+ // Spawn
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@mob=monster(.@m$, .@x, .@y, .@name$, .@mobid, 1);
+
+ // Reconfigure
+ setunitdata(.@mob, UDT_HP, .@newhp);
+ setunitdata(.@mob, UDT_MAXHP, .@newhp);
+ setunitdata(.@mob, UDT_SPEED, .@newspd);
+ setunitdata(.@mob, UDT_DEX, .@newdx);
+ setunitdata(.@mob, UDT_AGI, .@newag);
+ setunitdata(.@mob, UDT_ATKRANGE, .@newrg);
+ setunitdata(.@mob, UDT_ATKMIN, .@minatk);
+ setunitdata(.@mob, UDT_ATKMAX, .@maxatk);
+ setunitdata(.@mob, UDT_DEF, .@newdf);
+
+ logmes "Super spawn!", LOGMES_ATCOMMAND;
+
+ do
+ {
+ select
+ l("Good!"), // 1
+ l("Customize attack delay!"), // 2
+ l("Customize hit rate!"), // 3
+ l("Customize evasion!"), // 4
+ l("Modify monster level!"), // 5
+ rif($EVENT$ == "Valentine", l("Send them to Valentine Island!")),
+ l("Show me a report"), // 7
+ l("OMG CANCEL IT!!"); // 8
+ mes "";
+ switch (@menu) {
+ case 2:
+ .@tmp=getunitdata(.@mob, UDT_ADELAY);
+ mesc l("Default: %d, use 0 to cancel", .@tmp);
+ input .@new;
+ if (.@new > 0)
+ setunitdata(.@mob, UDT_ADELAY, .@new);
+ break;
+ case 3:
+ .@tmp=getunitdata(.@mob, UDT_HIT);
+ mesc l("Default: %d, use 0 to cancel", .@tmp);
+ input .@new;
+ if (.@new > 0)
+ setunitdata(.@mob, UDT_HIT, .@new);
+ break;
+ case 4:
+ .@tmp=getunitdata(.@mob, UDT_FLEE);
+ mesc l("Default: %d, use 0 to cancel", .@tmp);
+ input .@new;
+ if (.@new > 0)
+ setunitdata(.@mob, UDT_FLEE, .@new);
+ break;
+ case 5:
+ .@tmp=getunitdata(.@mob, UDT_LEVEL);
+ mesc l("Default: %d, use 0 to cancel", .@tmp);
+ mesc l("WARNING: Might have unexpected side effects!"), 1;
+ input .@new;
+ if (.@new > 0)
+ setunitdata(.@mob, UDT_LEVEL, .@new);
+ break;
+ case 6:
+ unitwarp(.@mob, "001-12", 132, 119);
+ break;
+ case 7:
+ mesc l("Too lazy.");
+ next;
+ break;
+ case 8:
+ mesc l("Are you sure?!"), 1;
+ next;
+ if (askyesno() == ASK_YES) {
+ logmes "Super spawn aborted!", LOGMES_ATCOMMAND;
+ unitkill(.@mob);
+ return;
+ }
+ break;
+ }
+
+ } while (@menu != 1);
+
+ // Make it a boss
+ .@md=getunitdata(.@mob, UDT_MODE);
+ setunitdata(.@mob, UDT_LEVEL, .@md|32); // 32: MD_BOSS
+ logmes "Super spawn completed! (GID "+.@mob+")", LOGMES_ATCOMMAND;
+ return;
+ }
@@ -220,6 +361,7 @@ function script GlobalEventMenu {
l("Drop Rate management"),
l("Reset Crazyfefe Fight"),
l("Change Season Event"),
+ rif(is_admin(), l("Spawn customized boss")),
rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))),
l("Close");
@@ -230,7 +372,8 @@ function script GlobalEventMenu {
case 2: dropManagement; break;
case 3: resetCandor(); break;
case 4: seasonManagement; break;
- case 6: close; break;
+ case 5: superSpawn(); break;
+ case 7: close; break;
default: return;
}