Skip to content

Commit

Permalink
Corrected OnTouch/OnTouch_ in NPC script (#1548)
Browse files Browse the repository at this point in the history
Some leftover from aegis convertion..

Skipped pre-re folder, I don't have old data.
  • Loading branch information
Atemo committed Sep 7, 2016
1 parent 18a8c73 commit d62f422
Show file tree
Hide file tree
Showing 107 changed files with 896 additions and 779 deletions.
6 changes: 3 additions & 3 deletions npc/airports/airships.txt
Expand Up @@ -32,7 +32,7 @@ OnUnhide:
specialeffect EF_SUMMONSLAVE;
end;

OnTouch:
OnTouch_:
switch ($@airplanelocation) {
case 0: warp "yuno",92,260; end;
case 1: warp "einbroch",92,278; end;
Expand Down Expand Up @@ -655,7 +655,7 @@ airplane,50,66,5 script Apple Merchant#airplane 86,{
airplane_01,243,73,0 script #AirshipWarp-3 45,1,1,{
end;

OnTouch:
OnTouch_:
switch ($@airplanelocation2) {
case 0: warp "ra_fild12",292,204; end;
case 1:
Expand Down Expand Up @@ -1027,7 +1027,7 @@ airplane_01,83,61,2 script Dianne#01airplane_01 72,2,2,{
mes "Do you think that...";
close;

OnTouch:
OnTouch_:
emotion e_sob;
end;
}
Expand Down
2 changes: 1 addition & 1 deletion npc/battleground/flavius/flavius01.txt
Expand Up @@ -332,7 +332,7 @@ OnInit:
disablenpc "bat_b01_rp1_a_warp";
end;

OnTouch:
OnTouch_:
percentheal 100,100;
warp "bat_b01",87,73;
end;
Expand Down
2 changes: 1 addition & 1 deletion npc/battleground/flavius/flavius02.txt
Expand Up @@ -333,7 +333,7 @@ OnInit:
disablenpc "bat_b02_rp1_a_warp";
end;

OnTouch:
OnTouch_:
percentheal 100,100;
warp "bat_b02",87,73;
end;
Expand Down
8 changes: 6 additions & 2 deletions npc/battleground/kvm/kvm01.txt
Expand Up @@ -36,8 +36,12 @@ OnEnterBG:
set $@KvM01BG_id2, waitingroom2bg("bat_c01",147,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie");
end;
}
bat_room,169,220,0 warp #kvm801 2,2,bat_room,154,150
bat_room,169,211,0 warp #kvm802 2,2,bat_room,154,150
bat_room,169,220,0 script #kvm801 WARPNPC,2,2,{
OnTouch:
warp "bat_room",154,150;
end;
}
bat_room,169,211,0 duplicate(#kvm801) #kvm802 WARPNPC,2,2

// Starting Line
//============================================================
Expand Down
8 changes: 6 additions & 2 deletions npc/battleground/kvm/kvm02.txt
Expand Up @@ -36,8 +36,12 @@ OnEnterBG:
set $@KvM02BG_id2, waitingroom2bg("bat_c02",147,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie");
end;
}
bat_room,197,220,0 warp #kvm601 2,2,bat_room,154,150
bat_room,197,211,0 warp #kvm602 2,2,bat_room,154,150
bat_room,197,220,0 script #kvm601 WARPNPC,2,2,{
OnTouch:
warp "bat_room",154,150;
end;
}
bat_room,197,21,0 duplicate(#kvm601) #kvm602 WARPNPC,2,2

// Starting Line
//============================================================
Expand Down
8 changes: 6 additions & 2 deletions npc/battleground/kvm/kvm03.txt
Expand Up @@ -35,8 +35,12 @@ OnEnterBG:
set $@KvM03BG_id2, waitingroom2bg("bat_c03",147,55,"KvM03_BG::OnCroixQuit","KvM03_BG::OnCroixDie");
end;
}
bat_room,225,220,0 warp #kvm701 2,2,bat_room,154,150
bat_room,225,211,0 warp #kvm702 2,2,bat_room,154,150
bat_room,225,220,0 script #kvm701 WARPNPC,2,2,{
OnTouch:
warp "bat_room",154,150;
end;
}
bat_room,225,211,0 duplicate(#kvm701) #kvm702 WARPNPC,2,2

// Starting Line
//============================================================
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/geffen.txt
Expand Up @@ -219,7 +219,7 @@ geffen_in,34,170,0 script Theodore 47,{
geffen,146,148,4 script Suspicious Guy 99,6,6,{
end;

OnTouch:
OnTouch_:
mes "[?]";
mes "^333333*Psssst!*";
mes "H-Hey you!";
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/jawaii.txt
Expand Up @@ -694,7 +694,7 @@ OnSolo:
}

jawaii_in,28,96,0 script jaw_em_order#Jawaii -1,3,3,{
OnTouch:
OnTouch_:
if (getpartnerid()) {
donpcevent "Employee#jaw8::OnWelcome";
donpcevent "Employee#jaw7::OnWelcome";
Expand Down
10 changes: 5 additions & 5 deletions npc/cities/lighthalzen.txt
Expand Up @@ -1032,7 +1032,7 @@ lighthalzen,297,239,3 duplicate(Berru#lhz_01) Pilia#lhz_01 818
lighthalzen,312,233,3 script Beggar#lhz_02 777,3,1,{
end;

OnTouch:
OnTouch_:
mes "[Beggar]";
mes "Please...";
mes "My child is starving...";
Expand Down Expand Up @@ -1818,7 +1818,7 @@ lhz_in01,35,226,5 script Rekenber Guard#li01 867,{
}

lhz_in01,23,132,3 script Rekenber Guard#li02 867,5,5,{
OnTouch:
OnTouch_:
if (isequipped(2241) && isequipped(2243)) {
mes "[Rekenber Guard]";
mes "Keep your eyes open.";
Expand Down Expand Up @@ -1924,7 +1924,7 @@ lhz_in01,199,137,3 script Scientist#li_03 865,{
}

lhz_in01,46,125,3 script Rekenber Guard#li03 867,5,5,{
OnTouch:
OnTouch_:
if (isequipped(2241) && isequipped(2243)) {
mes "[Rekenber Guard]";
mes "......................";
Expand Down Expand Up @@ -2901,7 +2901,7 @@ lighthalzen,40,107,4 script Vergil#zen4 869,{
}

lhz_in01,144,53,3 script Jorje#zero 98,1,1,{
OnTouch:
OnTouch_:
switch(rand(1,3)) {
case 1:
mes "[Jorje]";
Expand Down Expand Up @@ -2970,7 +2970,7 @@ lhz_in01,139,48,7 script Leimi#mimir 73,{
}

lhz_in01,138,47,0 script #mimir_camera -1,2,2,{
OnTouch:
OnTouch_:
if (BaseJob == Job_Assassin) {
if (Sex) {
mes "^3355FF*Click*^000000";
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/morocc.txt
Expand Up @@ -37,7 +37,7 @@ morocc,150,120,5 script Soldier - Morroc#01::MocSoldier 707,3,3,{
mes "This is a restricted area. You can't come any further!";
close;

OnTouch:
OnTouch_:
mes "[Morroc Soldier]";
mes "Hey, you! Stop there.";
next;
Expand Down
2 changes: 1 addition & 1 deletion npc/cities/niflheim.txt
Expand Up @@ -61,7 +61,7 @@ niflheim,195,211,6 script Gigantia#nif 796,3,3,{
mes "Death's sweet embrace.";
close;

OnTouch:
OnTouch_:
if (isequipped(5038) || isequipped(2257) || isequipped(2256)) {
mes "[Gigantia]";
mes "Hey, wait!";
Expand Down
6 changes: 3 additions & 3 deletions npc/cities/payon.txt
Expand Up @@ -115,7 +115,7 @@ payon,173,82,0 script Young Man#2payon 88,{
payon,158,246,3 script Guardsman#payon 708,3,3,{
end;

OnTouch:
OnTouch_:
mes "[Guardsman]";
mes "This is the Central Palace of Payon. This place is open to the public, but in accordance with our laws, you must behave in an orderly fashion once inside.";
next;
Expand Down Expand Up @@ -468,7 +468,7 @@ payon_in01,180,7,2 script Waitress#payon 90,{
payon_in03,96,116,3 script Chief Guardsman#payon 708,3,3,{
end;

OnTouch:
OnTouch_:
mes "[Chief Guardsman]";
mes "What brings";
mes "you here? ";
Expand Down Expand Up @@ -832,7 +832,7 @@ payon_in01,47,59,2 script Archer Wolt#payon 88,{
payon_in03,99,190,4 script Chief#payon 107,2,2,{
end;

OnTouch:
OnTouch_:
if (BaseLevel < 30) {
mes "[Guard]";
mes "Hey...";
Expand Down
4 changes: 2 additions & 2 deletions npc/cities/umbala.txt
Expand Up @@ -1001,7 +1001,7 @@ um_in,158,71,3 script Utan villager#um 787,{
}

umbala,140,197,1 script Bungee Jump -1,0,0,{
OnTouch:
OnTouch_:
switch(rand(1,3)) {
case 1:
percentheal -100,0;
Expand All @@ -1021,7 +1021,7 @@ OnTouch:
}

umbala,136,195,0 script #jump -1,1,1,{
OnTouch:
OnTouch_:
warp "umbala",145,166;
end;
}
16 changes: 8 additions & 8 deletions npc/instances/OrcsMemory.txt
Expand Up @@ -396,7 +396,7 @@ OnEnable:
areamonster instance_mapname("1@orcs"),103,105,109,111,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead1";
end;

OnTouch:
OnTouch_:
warp instance_mapname("1@orcs"),168,130;
end;

Expand Down Expand Up @@ -425,7 +425,7 @@ OnEnable:
areamonster instance_mapname("1@orcs"),32,40,38,46,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead2";
end;

OnTouch:
OnTouch_:
warp instance_mapname("1@orcs"),85,85;
end;

Expand Down Expand Up @@ -454,7 +454,7 @@ OnEnable:
areamonster instance_mapname("1@orcs"),19,177,25,183,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead3";
end;

OnTouch:
OnTouch_:
warp instance_mapname("1@orcs"),38,110;
end;

Expand Down Expand Up @@ -486,7 +486,7 @@ OnEnable:
donpcevent instance_npcname("#Resurrect Monsters4")+"::OnDisable";
end;

OnTouch:
OnTouch_:
warp instance_mapname("2@orcs"),32,171;
end;
}
Expand Down Expand Up @@ -731,7 +731,7 @@ OnTimer10000:
stopnpctimer;
end;

OnTouch:
OnTouch_:
warp instance_mapname("2@orcs"),47,93;
end;
}
Expand Down Expand Up @@ -762,7 +762,7 @@ OnTimer10000:
stopnpctimer;
end;

OnTouch:
OnTouch_:
warp instance_mapname("2@orcs"),107,55;
end;
}
Expand Down Expand Up @@ -807,7 +807,7 @@ OnTimer13110:
stopnpctimer;
end;

OnTouch:
OnTouch_:
warp instance_mapname("2@orcs"),167,95;
end;
}
Expand Down Expand Up @@ -860,7 +860,7 @@ OnEnable:
enablenpc instance_npcname("#Warp Outside Orc Dun");
end;

OnTouch:
OnTouch_:
warp "gef_fild10",240,197;
end;
}
Expand Down
8 changes: 4 additions & 4 deletions npc/instances/SealedShrine.txt
Expand Up @@ -972,7 +972,7 @@ OnTimer3500000:
}

2@cata,80,144,0 script ins_2f_enter -1,3,3,{
OnTouch:
OnTouch_:
donpcevent instance_npcname("ins_2f_enter_broad")+"::OnEnable";
disablenpc instance_npcname("ins_2f_enter");
end;
Expand Down Expand Up @@ -1009,7 +1009,7 @@ OnTimer18000:
}

2@cata,50,67,0 script slave_left -1,5,5,{
OnTouch:
OnTouch_:
set .@map$, instance_mapname("2@cata");
mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster .@map$,55,67,"Apostle of Baphomet",1869,1;
Expand All @@ -1033,7 +1033,7 @@ OnTouch:
}

2@cata,109,67,0 script slave_right -1,5,5,{
OnTouch:
OnTouch_:
set .@map$, instance_mapname("2@cata");
mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster .@map$,105,67,"Apostle of Baphomet",1869,1;
Expand All @@ -1057,7 +1057,7 @@ OnTouch:
}

2@cata,79,39,0 script slave_down -1,5,5,{
OnTouch:
OnTouch_:
set .@map$, instance_mapname("2@cata");
mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster .@map$,78,41,"Apostle of Baphomet",1869,1;
Expand Down

5 comments on commit d62f422

@technoken
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Atemo should all OnTouch be replaced by OnTouch_? What their difference? Just want to know bc I have custom npc's using OnTouch. Thanks!

@lucasoli
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@technoken they are both docummented at doc/script_commands.txt as you can see bellow:

OnTouch:

This label will be executed if a trigger area is defined for the NPC object it's
in. If it isn't present, the execution will start from the beginning of the NPC
code. The RID of the triggering character object will be attached.

OnTouch_:

Similar to OnTouch, but will only run one instance. Another character is
chosen once the triggering character leaves the area.

@Atemo
Copy link
Contributor Author

@Atemo Atemo commented on d62f422 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@technoken I replaced some OnTouch by OnTouch_ and some OnTouch_ by OnTouch according to our datas.
Additionnal note, hiding target doesn't execute OnTouch_.

@lucasoli
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Atemo Wow, that's new to me! I didn't know about the hiding target not triggering this event... can you update the doc/script_commands.txt to match the correct behavior?

@technoken
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. Thanks to both of you! @Atemo @lucasoli

Please sign in to comment.