diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-08-08 20:02:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-08-08 20:02:43 -0300 |
commit | b63163fd6705c1ac55935dd63d9818a5562e158e (patch) | |
tree | f7f5c7dd1cc2080916756a2b7f0501a35374661b /npc | |
parent | 5af84d339cf38f6433d7572e13f61218048bc980 (diff) | |
download | serverdata-b63163fd6705c1ac55935dd63d9818a5562e158e.tar.gz serverdata-b63163fd6705c1ac55935dd63d9818a5562e158e.tar.bz2 serverdata-b63163fd6705c1ac55935dd63d9818a5562e158e.tar.xz serverdata-b63163fd6705c1ac55935dd63d9818a5562e158e.zip |
Warp Mage favorite code (Jailer Respawn Point Changer)
Diffstat (limited to 'npc')
-rw-r--r-- | npc/sec_pri/jailer.txt | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/npc/sec_pri/jailer.txt b/npc/sec_pri/jailer.txt index e585ba813..5c0076481 100644 --- a/npc/sec_pri/jailer.txt +++ b/npc/sec_pri/jailer.txt @@ -8,7 +8,7 @@ sec_pri,22,21,0 script Warp Feltchstick NPC_PLAYER,{ mesn; mesq l("Carry on, criminal. I am %s and this jail was entrusted to me by kytty herself.", .name$); next; - if ($HARDCORE && getstatus(SC_JAILED,0) && is_admin()) { + if ($HARDCORE && getstatus(SC_JAILED,0)) { // Hardcore Server Logic (DOES NOT WORK well for some reason?) .@v1=getstatus(SC_JAILED, 1); .@v2=getstatus(SC_JAILED, 2); @@ -26,15 +26,22 @@ sec_pri,22,21,0 script Warp Feltchstick NPC_PLAYER,{ mes ""; closeclientdialog; if (!getstatus(SC_JAILED,0)) end; + debugmes "sc4 (%d, %d, %d, %d)", .@v1, .@v2, .@v3, .@v4; + debugmes "003-9 (%d) -> 000-1 (3)", getmapinfo(MAPINFO_ID, "003-9"); + debugmes "Target %s (%d,%d)", getmapinfo(MAPINFO_NAME, .@v3 - 1), (.@v4|0xFFFF), (.@v4 >> 16); switch (@menu) { case 2: debugmes "Change MID from %d to %d", .@v2, getmapinfo(MAPINFO_ID, "000-1"); - // Removing the comments below "work", except it warps you to 000-0 - // ...and when jail term expires you go back to jail. "warp" fails. - //sc_end SC_JAILED; - sc_start4 SC_JAILED, .@ti, .@v1, getmapinfo(MAPINFO_ID, "000-1"), 22, 22, 10000, SCFLAG_FIXEDRATE|SCFLAG_FIXEDTICK|SCFLAG_NOAVOID; - //warp .@m$, .@x, .@y; - debugmes "MID is now %d", getstatus(SC_JAILED, 2); + // When renewing status' information: val3 = map_index+1 val4 = coords + // coords are done with &0xFFFF and <<16 + // (22&0xFFFF|22<<16) + // ...However, @v4 has other stuff, so at the moment only save point + sc_start4 SC_JAILED, .@ti, .@v1, .@v2, getmapinfo(MAPINFO_ID, "000-1")+1, .@v4, 10000, SCFLAG_FIXEDRATE|SCFLAG_FIXEDTICK|SCFLAG_NOAVOID; + // Debug info + .@v3=getstatus(SC_JAILED, 3); + .@v4=getstatus(SC_JAILED, 4); + debugmes "sc4 (%d, %d, %d, %d)", .@v1, .@v2, .@v3, .@v4; + debugmes "Target %s (%d,%d)", getmapinfo(MAPINFO_NAME, .@v3 - 1), (.@v4|0xFFFF), (.@v4 >> 16); break; } } else { |