From 33c5c19806afeddb9a2b649facad9fb7f794948f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 29 Jan 2020 01:35:23 -0300 Subject: Prototype untested code for Mirror Islands --- npc/001-11/event_soulmenhir.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'npc') diff --git a/npc/001-11/event_soulmenhir.txt b/npc/001-11/event_soulmenhir.txt index 6516cbbd0..ebb9773da 100644 --- a/npc/001-11/event_soulmenhir.txt +++ b/npc/001-11/event_soulmenhir.txt @@ -11,6 +11,7 @@ menu l("Touch it."), L_Warp, rif(!#VALENTINE_EQUIPMENT2020 && gettime(GETTIME_YEAR) == 2020, l("Obtain event equipment")), L_EVTC2020, + rif(getusers(1) >= 6, l("Warp to a mirror island.")), L_WarpMirror, l("Leave it alone."), -; close; @@ -18,6 +19,41 @@ L_Warp: warp "Save", 0, 0; close; +// Done for multiple players +L_WarpMirror: + .@u=getusers(1); + mesn; + mes l("To which mirrored island you want to warp?"); + .@i=0; + .@dest$="Stay here"; + // Create instances as needed + while (.@i < .@u/6) { + .@i+=1; + .@dest$+=sprintf(":Mirror Island %d", .@i); + if (!(getd("$@VALENTINE_MI"+.@i) && + isinstance(getd("$@VALENTINE_MI"+.@i)))) { + debugmes "Create Mirror Island %d", .@i; + + .@tmpist = instance_create("001-11@Mirror"+.@i, 0, IOT_NONE); + instance_attachmap("001-11", .@tmpist, 0, "001-11@MI"+.@i); + instance_set_timeout(1000000, 1000000, .@tmpist); + instance_init(.@tmpist); + setd("$@VALENTINE_MI"+.@i, .@tmpist); + } + } + select .@dest$; + if (@menu == 1) + close; + @menu-=1; + warp "001-11@MI"+@menu, 38, 32; + dispbottom l("Mirror Island %d", @menu); + /* + select + rif(.@u >= 6, l("Mirror Island 1")), + */ + closeclientdialog; + close; + // Special labels L_EVTC2020: showavatar NPC_BARD_TRUMP; -- cgit v1.2.3-60-g2f50