summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2016-10-09 14:46:30 +0100
committerAsheraf <acheraf1998@gmail.com>2016-10-16 12:51:22 +0100
commit062f2cf4235cf07481ecaf58682f37f2ad8928f8 (patch)
tree30fd352940f19ba058705ca338a61339e10e4ead /npc/custom
parent9c777dfc4ce6d84e7da89d896baa05786e574a99 (diff)
downloadhercules-062f2cf4235cf07481ecaf58682f37f2ad8928f8.tar.gz
hercules-062f2cf4235cf07481ecaf58682f37f2ad8928f8.tar.bz2
hercules-062f2cf4235cf07481ecaf58682f37f2ad8928f8.tar.xz
hercules-062f2cf4235cf07481ecaf58682f37f2ad8928f8.zip
Change *getcharid to use constants
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/battleground/bg_tierra_01.txt6
-rw-r--r--npc/custom/battleground/bg_tierra_02.txt6
-rw-r--r--npc/custom/bgqueue/flavius.txt12
-rw-r--r--npc/custom/etc/marriage.txt6
-rw-r--r--npc/custom/events/cluckers.txt14
-rw-r--r--npc/custom/item_signer.txt2
-rw-r--r--npc/custom/itembind.txt4
-rw-r--r--npc/custom/quests/hunting_missions.txt12
-rw-r--r--npc/custom/woe_controller.txt2
9 files changed, 32 insertions, 32 deletions
diff --git a/npc/custom/battleground/bg_tierra_01.txt b/npc/custom/battleground/bg_tierra_01.txt
index bab80916b..56a505356 100644
--- a/npc/custom/battleground/bg_tierra_01.txt
+++ b/npc/custom/battleground/bg_tierra_01.txt
@@ -99,13 +99,13 @@ OnReadyCheck:
end;
OnNeutralBreak:
- if( getcharid(4) == $@TierraBG1_id1 )
+ if( getcharid(CHAR_ID_BG) == $@TierraBG1_id1 )
{
mapannounce "bat_a01","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG1_id2,42,16;
areawarp "bat_a01",52,208,61,217,"bat_a01",42,16;
}
- else if( getcharid(4) == $@TierraBG1_id2 )
+ else if( getcharid(CHAR_ID_BG) == $@TierraBG1_id2 )
{
mapannounce "bat_a01","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG1_id1,50,374;
@@ -113,7 +113,7 @@ OnNeutralBreak:
}
else end;
- set .Neutral_Base, getcharid(4);
+ set .Neutral_Base, getcharid(CHAR_ID_BG);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
diff --git a/npc/custom/battleground/bg_tierra_02.txt b/npc/custom/battleground/bg_tierra_02.txt
index 791f02109..e0f1b402a 100644
--- a/npc/custom/battleground/bg_tierra_02.txt
+++ b/npc/custom/battleground/bg_tierra_02.txt
@@ -99,13 +99,13 @@ OnReadyCheck:
end;
OnNeutralBreak:
- if( getcharid(4) == $@TierraBG2_id1 )
+ if( getcharid(CHAR_ID_BG) == $@TierraBG2_id1 )
{
mapannounce "bat_a02","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG2_id2,42,16;
areawarp "bat_a02",52,208,61,217,"bat_a02",42,16;
}
- else if( getcharid(4) == $@TierraBG2_id2 )
+ else if( getcharid(CHAR_ID_BG) == $@TierraBG2_id2 )
{
mapannounce "bat_a02","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG2_id1,50,374;
@@ -113,7 +113,7 @@ OnNeutralBreak:
}
else end;
- set .Neutral_Base, getcharid(4);
+ set .Neutral_Base, getcharid(CHAR_ID_BG);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
diff --git a/npc/custom/bgqueue/flavius.txt b/npc/custom/bgqueue/flavius.txt
index 33561db0a..d959253f3 100644
--- a/npc/custom/bgqueue/flavius.txt
+++ b/npc/custom/bgqueue/flavius.txt
@@ -170,12 +170,12 @@ OnReset:
end;
OnCroixQuit:
- queueremove($@Croix_QueueBG1,getcharid(3));
+ queueremove($@Croix_QueueBG1,getcharid(CHAR_ID_ACCOUNT));
callsub L_OnPlayerQuit;
end;
OnGuillaumeQuit:
- queueremove($@Guill_QueueBG1,getcharid(3));
+ queueremove($@Guill_QueueBG1,getcharid(CHAR_ID_ACCOUNT));
callsub L_OnPlayerQuit;
end;
@@ -437,7 +437,7 @@ OnTouch:
}
bat_b01,10,294,3 script Guillaume Vintenar#b01_a 4_M_RASWORD,{
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 1) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -489,7 +489,7 @@ OnInit:
}
bat_b01,389,14,3 script Croix Vintenar#b01_b 4_M_RASWORD,{
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 2) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -623,7 +623,7 @@ bat_b01,389,16,3 script Croix Camp#flag31 1_FLAG_EAGLE,{ end; }
bat_b01,10,294,3 script Vintenar#bat_b01_aover 4_M_KY_HEAD,{
set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -701,7 +701,7 @@ OnInit:
bat_b01,389,14,3 script Vintenar#bat_b01_bover 4_M_CRU_HEAD,{
set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt
index 76b0429c8..4e521ec55 100644
--- a/npc/custom/etc/marriage.txt
+++ b/npc/custom/etc/marriage.txt
@@ -723,13 +723,13 @@ function SF_TryRegister {
set $wed_bride$,strcharinfo(PC_NAME);
$wed_bride_sex = Sex;
if ($@wedding_effect == 1) //Store account id for effect.
- set $wedding_effect_id, getcharid(3);
+ set $wedding_effect_id, getcharid(CHAR_ID_ACCOUNT);
} else {
set $wed_groom_progress,1;
set $wed_groom$,strcharinfo(PC_NAME);
$wed_groom_sex = Sex;
if ($@wedding_effect == 2) //Store account id for effect.
- set $wedding_effect_id, getcharid(3);
+ set $wedding_effect_id, getcharid(CHAR_ID_ACCOUNT);
}
}
@@ -882,7 +882,7 @@ function SF_InProgress {
mes "...I am still waiting for your partner to confirm the divorce procedure.";
close;
}
- if (getcharid(0) != $@divorcee) {
+ if (getcharid(CHAR_ID_CHAR) != $@divorcee) {
mes "["+@name$+"]";
mes "I am in the progress of divorcing "+$@divorcer$+".";
mes "Do you know who the spouse is?";
diff --git a/npc/custom/events/cluckers.txt b/npc/custom/events/cluckers.txt
index f0967590b..fbdbbed3f 100644
--- a/npc/custom/events/cluckers.txt
+++ b/npc/custom/events/cluckers.txt
@@ -23,20 +23,20 @@ prontera,156,219,4 script Cluckers 4_NFCOCK,{
if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
- case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
- case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
+ case 2: unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; break;
case 3: sc_start SC_FREEZE,10000,0; break;
- case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 5: sc_start SC_SLEEP,10000,0; break;
case 6: sc_start SC_STONE,10000,0; emotion 29; break;
- case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
- case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 9: sc_start SC_STUN,10000,0; break;
case 10: sc_start SC_SLEEP,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_STUN,10000,0; break;
- case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
+ case 13: unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
@@ -46,7 +46,7 @@ prontera,156,219,4 script Cluckers 4_NFCOCK,{
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
- unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
+ unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1;
}
break;
}
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index 7e90542b1..a0097bb55 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -126,7 +126,7 @@ prt_in,24,61,7 script Perchik 1_M_01,{
delitem2 .@id,1,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3];
mes "Done!";
emotion e_proud;
- getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
+ getitem2 .@id,1,1,.@ref,0,254,0,getcharid(CHAR_ID_CHAR)&0xffff,(getcharid(CHAR_ID_CHAR)>>16)&0xffff;
equip .@id;
close;
}
diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt
index 66b37f4e7..8c51ad24d 100644
--- a/npc/custom/itembind.txt
+++ b/npc/custom/itembind.txt
@@ -25,7 +25,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{
}
mes "What kind of bind?";
.@boundtype = 1 << (select("Account", "Guild", "Character")-1);
- if(.@boundtype == 2 && (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(PC_NAME))) {
+ if(.@boundtype == 2 && (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) {
mes "In order for me to bind an item to a guild you must be the master of one.";
close;
}
@@ -92,7 +92,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{
next;
for(.@i = 0; .@i < getarraysize(@bound_items); .@i++) {
if(@inventorylist_id[.@item] == @bound_items[.@i] &&
- (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(PC_NAME))
+ (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))
) {
mes "I will only unbind guild bound items that the guild master requests.";
close;
diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt
index dc4e20f79..611bdd480 100644
--- a/npc/custom/quests/hunting_missions.txt
+++ b/npc/custom/quests/hunting_missions.txt
@@ -50,7 +50,7 @@ function Chk; function Cm;
mes "You've started a mission";
mes "on another character.";
if ( !@hm_char_del_check ) {
- if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(3) +" )", .@dummy ) ) {
+ if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(CHAR_ID_ACCOUNT) +" )", .@dummy ) ) {
next;
mes "[Hunting Missions]";
mes "I can't seem to find any records";
@@ -198,8 +198,8 @@ Mission_Status:
set #Mission_Count,0;
if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
set Mission_Total, Mission_Total+1;
- if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'Mission_Total','0',1)");
- else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE `char_id` = "+getcharid(0)+" AND `key` = 'Mission_Total'");
+ if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(CHAR_ID_CHAR)+",'Mission_Total','0',1)");
+ else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE `char_id` = "+getcharid(CHAR_ID_CHAR)+" AND `key` = 'Mission_Total'");
close;
Mission_Info:
@@ -258,7 +258,7 @@ OnBuyItem:
close;
OnNPCKillEvent:
- if (!getcharid(1) || !.Party) {
+ if (!getcharid(CHAR_ID_PARTY) || !.Party) {
if (!#Mission_Count || !Mission0) end;
for (set .@i, 0; .@i<.Quests; set .@i,.@i+1) {
if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission"+.@i))) {
@@ -271,8 +271,8 @@ OnNPCKillEvent:
} else if (.Party) {
set .@mob, killedrid;
getmapxy(.@map1$, .@x1, .@y1, UNITTYPE_PC);
- getpartymember getcharid(1),1;
- getpartymember getcharid(1),2;
+ getpartymember getcharid(CHAR_ID_PARTY),1;
+ getpartymember getcharid(CHAR_ID_PARTY),2;
for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) {
if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
attachrid $@partymemberaid[.@i];
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index e109951d7..14e288be7 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -194,7 +194,7 @@ OnReward:
OnPCLoadMapEvent:
if (!compare(strcharinfo(PC_MAP),"g_cas")) end;
if (((.AutoKick && .Active[0]) || (.NoOwner && !getcastledata(strcharinfo(PC_MAP),1))) && !(.Active[0]&(1<<getd("."+strcharinfo(PC_MAP))))) {
- if (getcharid(2) && getcastledata(strcharinfo(PC_MAP),1) == getcharid(2)) end;
+ if (getcharid(CHAR_ID_GUILD) && getcastledata(strcharinfo(PC_MAP),1) == getcharid(CHAR_ID_GUILD)) end;
sleep2 1000;
message strcharinfo(PC_NAME), getcastlename(strcharinfo(PC_MAP))+" is currently inactive.";
sleep2 5000;