onlywhenI puton myNPCemulatorit is givingan error,can someonepleasehelp me? is attached:imageandscripterror
I thank youmuchhelp.
Image of erro:
Script:
- script WOE_ME -1,{
OnAgitStart2:
disablenpc "schg102";
set $@Woe_meDuration,gettimetick(2)+$@Woe_me_Duration*60;
if (agitcheck2()) {
MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2;
GvgOn "schg_cas01";
donpcevent "WOE_ME::Onstart";
}
else {
}
set $@empreplaced,0;
disablenpc "schg103";
disablenpc "Mysterious Sunflower#01";
//
enablenpc "#schg102_ME";
enablenpc "schgx02";
enablenpc "Mid Steward";
enablenpc "Defensive#schg_cas01";
enablenpc "Attacksive#schg_cas01";
enablenpc "Opposite#schg_cas01";
enablenpc "Opposite#dschg_cas01";
donpcevent "Woe_meautomenu::OnReCooldown";
announce "Modern War Emperium Has Begun",bc_all;
end;
OnAgitEnd2:
GvgOff "schg_cas01";
disablenpc "#schg102_ME";
if (GetCastleData("schg_cas01",1)) {
KillMonster "schg_cas01","Steward#sch01::OnStartArena";
donpcevent "WOE_ME::Onreset";
donpcevent "Steward#sch01::Onstop";
}
set $@empreplaced,0;
disablenpc "#schg102_ME";
disablenpc "schgx02";
disablenpc "Mid Steward";
disablenpc "Defensive#schg_cas01";
disablenpc "Attacksive#schg_cas01";
disablenpc "Opposite#schg_cas01";
disablenpc "Opposite#dschg_cas01";
//
enablenpc "schg102";
enablenpc "schg103";
enablenpc "Mysterious Sunflower#01";
announce "Modern War Emperium Has Ended",bc_all;
end;
Onstart:
if (GetCastleData("schg_cas01",1)) {
}
monster "schg_cas01",120,272,"Emperium",1288,1,"Steward#sch01::OnStartArena";
end;
Onreset:
end;
Onchange:
setarray $agit_sc01[0],2,2,1,1,2,0;
monster "schg_cas01",120,272,"Emperium",1288,1,"Steward#sch01::OnStartArena";
callfunc "woemesetcooldown","atk",5;
//donpcevent "Control Device03#sch01::OnEnable";
//donpcevent "1st Guardian Stone#sch01::OnEnable";
//donpcevent "2nd Guardian Stone#sch01::OnEnable";
end;
OnClock0001:
if (!GetCastleData("schg_cas01",1)) end;
killmonster "schg_cas01","WOE_ME::OnTreasureDied";
if (GetCastleData("schg_cas01",4)) {
set .@Economy,GetCastleData("schg_cas01",2);
SetCastleData "schg_cas01",2,.@Economy + GetCastleData("schg_cas01",4) + (rand(2) && getgdskilllv(.@GID,10014));
if (GetCastleData("schg_cas01",2) > 100) SetCastleData "schg_cas01",2,100;
setcastledata "schg_cas01",4,0;
}
if (GetCastleData("schg_cas01",5)) {
set .@Defence,GetCastleData("schg_cas01",3);
SetCastleData "schg_cas01",3,.@Defence + GetCastleData("schg_cas01",5);
if (GetCastleData("schg_cas01",3) > 100) SetCastleData "schg_cas01",3,100;
setcastledata "schg_cas01",5,0;
}
set .@Treasure,GetCastleData("schg_cas01",2)/5+4;
if (.@Treasure) {
monster "schg_cas01",388,388,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
monster "schg_cas01",388,389,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
monster "schg_cas01",388,390,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
monster "schg_cas01",387,390,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 5) end;
monster "schg_cas01",386,390,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 6) end;
monster "schg_cas01",385,390,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 7) end;
monster "schg_cas01",384,389,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 8) end;
monster "schg_cas01",384,388,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 9) end;
monster "schg_cas01",384,387,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 10) end;
monster "schg_cas01",384,386,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 11) end;
monster "schg_cas01",384,385,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 12) end;
monster "schg_cas01",384,384,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 13) end;
monster "schg_cas01",385,384,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 14) end;
monster "schg_cas01",386,384,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 15) end;
monster "schg_cas01",387,384,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 16) end;
monster "schg_cas01",388,384,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 17) end;
monster "schg_cas01",389,384,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 18) end;
monster "schg_cas01",390,384,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 19) end;
monster "schg_cas01",390,385,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 20) end;
monster "schg_cas01",390,386,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 21) end;
monster "schg_cas01",389,386,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 22) end;
monster "schg_cas01",388,386,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 23) end;
monster "schg_cas01",387,386,"Treasure Chest",1938,1,"WOE_ME::OnTreasureDied";
if (.@Treasure < 24) end;
monster "schg_cas01",386,386,"Treasure Chest",1324,1,"WOE_ME::OnTreasureDied";
}
end;
OnTreasureDied:
end;
}
sch_gld,293,90,0 script #schg102_ME 45,2,2,{
if($@MidSchg_cas01==getcharid(2)){
if($@woe_meAW==1) {
switch(select("First Door:Mid Flag:Upper Mid Flag")) {
case 1:
if($@MidSchg_cas01==0) {
mes "Some bad happen inside castle, warp has been cancel";
sleep2 2000;
warp "sch_gld",294,95;
end;
}
warp "schg_cas01",119,8;
end;
case 2:
if($@MidSchg_cas01==0) {
mes "Some bad happen inside castle, warp has been cancel";
sleep2 2000;
warp "sch_gld",294,95;
end;
}
else if($@MidSchg_cas01!=getcharid(2)) {
mes "Sorry You Are Lately Warp, Mid flag Has been catched by other guild";
sleep2 2000;
warp "schg_cas01",119,8;
end;
}
mes "Please Wait 3 second";
sleep2 3000;
if(rand(2))
warp "schg_cas01",100+rand(10),142+rand(8);
else
warp "schg_cas01",129+rand(9),142+rand(8);
end;
case 3://114,220,125,208
if($@MidSchg_cas01==0) {
mes "Some bad happen inside castle, warp has been cancel";
sleep2 2000;
warp "sch_gld",294,95;
end;
}
else if($@MidSchg_cas01!=getcharid(2)) {
mes "Sorry You Are Lately Warp, Mid flag Has been catched by other guild";
sleep2 2000;
warp "schg_cas01",119,8;
end;
}
mes "Please Wait 3 second";
sleep2 3000;
warp "schg_cas01",114+rand(11),200+rand(8);
end;
}
}
else if((select("First Door:Mid Flag")==2)){
if($@MidSchg_cas01==0) {
mes "Some bad happen inside castle, warp has been cancel";
sleep2 2000;
warp "sch_gld",294,95;
end;
}
else if($@MidSchg_cas01!=getcharid(2)) {
mes "Sorry You Are Lately Warp, Mid flag Has been catched by other guild";
sleep2 2000;
warp "schg_cas01",119,8;
end;
}
mes "Please Wait 3 second";
sleep2 3000;
if(rand(2))
warp "schg_cas01",100+rand(10),142+rand(8);
else
warp "schg_cas01",129+rand(9),142+rand(8);
}
else {
if($@MidSchg_cas01==0) {
mes "Some bad happen inside castle, warp has been cancel";
sleep2 2000;
warp "sch_gld",294,95;
end;
}
warp "schg_cas01",119,8;
}
}
else
warp "schg_cas01",119,8;
end;
}
schg_cas01,93,249,0 warp schgx01 1,1,schg_cas01,105,112
schg_cas01,275,240,0 warp schgx02 1,1,schg_cas01,120,280
schg_cas01,120,283,0 warp schgx03 1,1,schg_cas01,275,242
schg_cas01,119,139,4 script Mid Steward 974,{//cant use sprite 722 its bug
if($@MidSchg_cas01==getcharid(2) || getcharid(2)==0) end;
if(gettimetick(2) <= $@midx2) {
dispbottom "Flag Is locked in a few second";
end;
}
//set .x,1;
hideonnpc "Mid Steward";
//donpcevent "Mid Steward::Onconquest";
set .@x2,0;
set .@x1,0;
if(.gc[0]!=0)
do {
if(.gc[.@x1]==0) {
set .@x2,.@x1;
goto PF_0;
}
else if(.gc[.@x1]==getcharid(2)) {
initnpctimer;
set .@x2,.@x1;
emotion e_gasp,1,strcharinfo(0);
if(.gc[.@x1+1]==1) goto PF_1;
else if(.gc[.@x1+1]==2) goto PF_2;
}
set .@x1,.@x1+1;
} while ( .@x1<128 );
PF_0:
emotion e_gasp,1,strcharinfo(0);
initnpctimer;
setnpctimer 2000;
progressbar "0x00FF00",$@MidFlagCatchTime[0];
unittalk getcharid(3),"1/3 First Point Complete";
set .gc[.@x2],getcharid(2);
set .gc[.@x2+1],1;
PF_1:
setnpctimer (5-1)*1000;
progressbar "0x00FF00",$@MidFlagCatchTime[1];
unittalk getcharid(3),"2/3 Second Point Complete";
set .gc[.@x2+1],2;
PF_2:
setnpctimer (5-1)*1000;
progressbar "0x00FF00",$@MidFlagCatchTime[2];
unittalk getcharid(3),"3/3 Captured";
cleararray .gc[0],0,getarraysize(.gc);
set $@MidSchg_cas01,getcharid(2);
//set .x,0;
mapannounce "schg_cas01","Mid Flag was captured by [" + strcharinfo(2) + "]"+strcharinfo(0),bc_map,"0xFF0000",FW_NORMAL,20,0,40;
mapannounce "sch_gld","Mid Flag[Himinn] was captured by [" + strcharinfo(2) + "]"+strcharinfo(0),bc_map,"0x00FF00";
set $@midx2,gettimetick(2)+$@MidflagLockTime;
donpcevent "Mid Steward::OnDelayLocked";
hideoffnpc "Mid Steward";
end;
OnDelayLocked:
detachrid;
sleep2 $@MidflagLockTime*1000;
mapannounce "schg_cas01","Mid Flag Is Unlocked",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
mapannounce "sch_gld","Mid Flag[Himinn] Is Unlocked",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
end;
OnTimer7000:
hideoffnpc "Mid Steward";
end;
Oninit:
cleararray .gc[0],0,getarraysize(.gc);
end;
}
//$@MidSchg_cas01
schg_cas01,104,240,3 script Defensive#schg_cas01 1188,{
if(getcharid(2)==0) end;
if(getcharid(2) == getcastledata("schg_cas01",1))
if($@MidSchg_cas01 == getcharid(2)) {
getmapxy(.@m1$,.@q1,.@w1,0);
getmapxy(.@m2$,.@q2,.@w2,1);
if(distance(.@q1,.@w1,.@q2,.@w2) > 3) end;
goto L_startD;
}
else {
mes "[Defensive]";
mes "I no have power if you not catched mid flag";
mes "";
mes "Go catch it";
close;
}
else {
mes "[Defensive]";
mes "You are not my master, sorry";
mes "I can be your master, If you break down other guild emperium in this castle";
close;
}
end;
L_startD:
mes "[Defensive]";
mes "Welcome, What can i do, Master";
next;
mes "[Defensive]";
if(getcharid(0)==getguildmasterid(getcharid(2))) {
set .@menub$,$@defensivem_G$;
set .@x,select(""+.@menub$+":cancel");
callfunc "woemetofunc","$@defmenu_G",.@x;
}
else {
set .@menub$,$@defensivem$;
set .@x,select(""+.@menub$+":cancel");
callfunc "woemetofunc","$@defmenu",.@x;
}
close;
close;
end;
OnGuardianDied:
set $@g1schg_cas01,0;
end;
}
schg_cas01,136,240,5 script Attacksive#schg_cas01 1163,{
if(getcharid(2)==0) end;
if(getcharid(2) != getcastledata("schg_cas01",1)) {
mes "[Attacksive]";
mes "Hello Stranger, Please Get Away";
close;
}
getmapxy(.@m1$,.@q1,.@w1,0);
getmapxy(.@m2$,.@q2,.@w2,1);
if(distance(.@q1,.@w1,.@q2,.@w2) > 3) end;
mes "[Attacksive]";
mes "Welcome, What can i do";
next;
mes "[Attacksive]";
if(getcharid(0)==getguildmasterid(getcharid(2))) {
set .@menua$,$@attacksivem_G$;
set .@x,select(""+.@menua$+":cancel");
callfunc "woemetofunc","$@attmenu_G",.@x;
}
else {
set .@menua$,$@attacksivem$;
set .@x,select(""+.@menua$+":cancel");
callfunc "woemetofunc","$@attmenu",.@x;
}
close;
if($@MidSchg_cas01 == getcastledata("schg_cas01",1))
if($@MidSchg_cas01==getcharid(2))
mes "Hello guild";
close;
end;
OnOpposite:
detachrid;
emotion 23,0,"Attacksive#schg_cas01";
hideonnpc "Attacksive#schg_cas01";
sleep2 15000;
hideoffnpc "Attacksive#schg_cas01";
end;
}
schg_cas01,173,36,3 script Opposite#schg_cas01 1320,{
if(getcharid(2)==0) end;
if(getcharid(2) == getcastledata("schg_cas01",1)) {
mes "[Opposite]";
mes "I cant help you to anything";
close;
}
if($@MidSchg_cas01==getcharid(2)) {
getmapxy(.@m1$,.@q1,.@w1,0);
getmapxy(.@m2$,.@q2,.@w2,1);
if(distance(.@q1,.@w1,.@q2,.@w2) > 3) end;
goto L_startA;
}
else {
mes "[Opposite]";
mes "I got special thing for you";
mes "If you catched mid flag";
close;
}
L_startA:
mes "[Opposite]";
mes "Welcome, What can i do, Master";
next;
mes "[Opposite]";
if(getcharid(0)==getguildmasterid(getcharid(2))) {
set .@menuo$,$@oppositem_G$;
set .@x,select(""+.@menuo$+":cancel");
callfunc "woemetofunc","$@oppmenu_G",.@x;
}
else {
set .@menuo$,$@oppositem$;
set .@x,select(""+.@menuo$+":cancel");
callfunc "woemetofunc","$@oppmenu",.@x;
}
close;
close;
mes "Hello World";
if($@MidSchg_cas01 != getcastledata("schg_cas01",1))
if($@MidSchg_cas01==getcharid(2)) {
mes "Hello Stranger";
callfunc "Party_recall",0;
}
else
mes "I Only support you When you captured The Flag at Middle Castle";
close;
end;
}
schg_cas01,140,64,4 duplicate(Opposite#schg_cas01) Opposite#dschg_cas01 1320
// Guild Manager
schg_cas01,247,305,3 script Steward#sch01 55,{
set .@GID, GetCastleData("schg_cas01",1);
if (.@GID == 0) {
mes "[ Steward ]";
mes "I await for the master";
mes "whom destiny will choose";
mes "for me. Do you think you";
mes "have to courage and strength";
mes "to conquer this stronghold?";
close;
}
if (getcharid(2) != .@GID || strcharinfo(0) != getguildmaster(.@GID)) {
mes "[ Steward ]";
mes "Hmpf. Your threats don't";
mes "scare me! Guardians, drive";
mes "this infidel away from here!";
mes "I will always be loyal to the";
mes "master of this stronghold,";
mes "the one and only ^FF0000" + getguildmaster(.@GID) + "^000000.";
close;
}
mes "[ Steward ]";
mes "Ah, Master ^FF0000" + getguildmaster(.@GID) + "^000000...";
mes "How shall I serve you today?";
mes "Was there an aspect of this";
mes "stronghold's maintenance";
mes "you wanted to discuss?";
next;
switch(select("Stronghold Briefing:Invest in Commercial Growth:Invest in Defense growth:Hire/Fire Storage Staff:Go to Master's room")) {
case 1:
mes "[ Steward ]";
mes "The Commercial Growth";
mes "Level of the stronghold is ^0000ff" + GetCastleData("schg_cas01",2) + ".";
if (GetCastleData("schg_cas01",4) > 0) {
mes "Last time, you invested in";
mes "Commercial Growth " + GetCastleData("schg_cas01",4) + ".";
}
next;
mes "[ Steward ]";
mes "Our stronghold's";
mes "safeguard level is " + GetCastleData("schg_cas01",3) + ".";
if (GetCastleData("schg_cas01",5) > 0) {
mes "Last time, you invested";
mes "in defense " + GetCastleData("schg_cas01",5) + " times.";
}
mes " ";
mes "That is all, master.";
close;
case 2:
set .@Economy,GetCastleData("schg_cas01",2);
if (.@Economy < 6) { set .@eco_invest,5000; }
else if ((.@Economy >= 6) && (.@Economy <= 10)) { set .@eco_invest,10000; }
else if ((.@Economy >= 11) && (.@Economy <= 15)) { set .@eco_invest,20000; }
else if ((.@Economy >= 16) && (.@Economy <= 20)) { set .@eco_invest,35000; }
else if ((.@Economy >= 21) && (.@Economy <= 25)) { set .@eco_invest,55000; }
else if ((.@Economy >= 26) && (.@Economy <= 30)) { set .@eco_invest,80000; }
else if ((.@Economy >= 31) && (.@Economy <= 35)) { set .@eco_invest,110000; }
else if ((.@Economy >= 36) && (.@Economy <= 40)) { set .@eco_invest,145000; }
else if ((.@Economy >= 41) && (.@Economy <= 45)) { set .@eco_invest,185000; }
else if ((.@Economy >= 46) && (.@Economy <= 50)) { set .@eco_invest,230000; }
else if ((.@Economy >= 51) && (.@Economy <= 55)) { set .@eco_invest,280000; }
else if ((.@Economy >= 56) && (.@Economy <= 60)) { set .@eco_invest,335000; }
else if ((.@Economy >= 61) && (.@Economy <= 65)) { set .@eco_invest,395000; }
else if ((.@Economy >= 66) && (.@Economy <= 70)) { set .@eco_invest,460000; }
else if ((.@Economy >= 71) && (.@Economy <= 75)) { set .@eco_invest,530000; }
else if ((.@Economy >= 76) && (.@Economy <= 80)) { set .@eco_invest,605000; }
else if ((.@Economy >= 81) && (.@Economy <= 85)) { set .@eco_invest,685000; }
else if ((.@Economy >= 86) && (.@Economy <= 90)) { set .@eco_invest,770000; }
else if ((.@Economy >= 91) && (.@Economy <= 95)) { set .@eco_invest,860000; }
else if ((.@Economy >= 96) && (.@Economy <= 100)) { set .@eco_invest,955000; }
//Quadruple the cost of investing if you've already invested once.
if (GetCastleData("schg_cas01",4)) {
set .@eco_invest,.@eco_invest*4;
}
mes "[ Steward ]";
mes "Raising the stronghold's";
mes "commercial growth will";
mes "increase the quantity of";
mes "goods produced for the guild.";
mes "Investing in commercial growth";
mes "will help the guild's future.";
next;
mes "[ Steward ]";
mes "You can make one investment";
mes "each day, but if you can make";
mes "two investments if you pay";
mes "more zeny: this will speed";
mes "up commercial development,";
mes "but can be quite expensive.";
next;
if (.@Economy == 100) {
mes "[ Steward ]";
mes "However, our stronghold's";
mes "commerical growth level is";
mes "at 100%. It's not possible to";
mes "develop commercial growth";
mes "any further than that.";
close;
}
if (GetCastleData("schg_cas01",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
mes "have to wait until tomorrow";
mes "to make another investment.";
close;
}
if (GetCastleData("schg_cas01",4) == 0) {
mes "[ Steward ]";
mes "You must pay ^FF0000" + .@eco_invest + "^000000 zeny";
mes "to make an investment";
mes "Will you invest in this";
mes "stronghold's commerical";
mes "development now?";
}
else {
mes "[ Steward ]";
mes "You must pay ^FF0000" + .@eco_invest + "^000000";
mes "more zeny to make a second";
mes "investment today. Will you";
mes "invest one more time?";
}
next;
switch(select("Invest in Commercial Growth:Cancel")) {
case 1:
if (GetCastleData("schg_cas01",4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
mes "have to wait until tomorrow";
mes "to make another investment.";
close;
}
if (Zeny < .@eco_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
mes "you do not have enough";
mes "zeny to make an investment";
mes "for the guild today.";
close;
}
set zeny,zeny-.@eco_invest;
SetCastleData "schg_cas01",4,GetCastleData("schg_cas01",4)+1;
mes "[ Steward ]";
mes "A wise use of the guild's";
mes "funds, Master. We can expect";
mes "to see the results of this";
mes "investment by tomorrow.";
close;
case 2:
mes "[ Steward ]";
mes "As you command, Master.";
close;
}
case 3:
set .@Defence,GetCastleData("schg_cas01",3);
if (.@Defence < 6) { set .@def_invest,10000; }
else if ((.@Defence >= 6) && (.@Defence <= 10)) { set .@def_invest,20000; }
else if ((.@Defence >= 11) && (.@Defence <= 15)) { set .@def_invest,40000; }
else if ((.@Defence >= 16) && (.@Defence <= 20)) { set .@def_invest,70000; }
else if ((.@Defence >= 21) && (.@Defence <= 25)) { set .@def_invest,110000; }
else if ((.@Defence >= 26) && (.@Defence <= 30)) { set .@def_invest,160000; }
else if ((.@Defence >= 31) && (.@Defence <= 35)) { set .@def_invest,220000; }
else if ((.@Defence >= 36) && (.@Defence <= 40)) { set .@def_invest,290000; }
else if ((.@Defence >= 41) && (.@Defence <= 45)) { set .@def_invest,370000; }
else if ((.@Defence >= 46) && (.@Defence <= 50)) { set .@def_invest,460000; }
else if ((.@Defence >= 51) && (.@Defence <= 55)) { set .@def_invest,560000; }
else if ((.@Defence >= 56) && (.@Defence <= 60)) { set .@def_invest,670000; }
else if ((.@Defence >= 61) && (.@Defence <= 65)) { set .@def_invest,790000; }
else if ((.@Defence >= 66) && (.@Defence <= 70)) { set .@def_invest,920000; }
else if ((.@Defence >= 71) && (.@Defence <= 75)) { set .@def_invest,1060000; }
else if ((.@Defence >= 76) && (.@Defence <= 80)) { set .@def_invest,1210000; }
else if ((.@Defence >= 81) && (.@Defence <= 85)) { set .@def_invest,1370000; }
else if ((.@Defence >= 86) && (.@Defence <= 90)) { set .@def_invest,1540000; }
else if ((.@Defence >= 91) && (.@Defence <= 95)) { set .@def_invest,1720000; }
else if ((.@Defence >= 96) && (.@Defence <= 100)) { set .@def_invest,1910000; }
//Quadruple the cost of investing if you've already invested once.
if (GetCastleData("schg_cas01",5)) {
set .@def_invest,.@def_invest*4;
}
mes "[ Steward ]";
mes "Investing in our stronghold's";
mes "defense will enhance the";
mes "durability of our Guardians";
mes "and the Emperium. We'll need";
mes "every advantage to protect";
mes "ourselves from our enemies.";
next;
mes "[ Steward ]";
mes "You can invest in defense";
mes "once per day, but if you pay";
mes "more zeny, you can invest";
mes "a maximum of two times daily.";
next;
mes "[ Steward ]";
if (GetCastleData("schg_cas01",3) == 100) {
mes "The Defense Level of this";
mes "stronghold is 100%, and";
mes "cannot be increased further.";
close;
}
if (GetCastleData("schg_cas01",5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
mes "until tomorrow if you really";
mes "want to increase our defenses.";
close;
}
if (GetCastleData("schg_cas01",5) == 0) {
mes "We need ^FF0000" + .@def_invest + "^000000";
mes "zeny to invest in our";
mes "stronghold's defenses.";
mes "Will you invest now?";
}
else {
mes "We need ^FF0000" + .@def_invest + "^000000";
mes "zeny to invest in our";
mes "stronghold's defenses";
mes "a second time today.";
mes "Will you invest now?";
}
next;
switch(select("Invest in Defense:Cancel")) {
case 1:
if (GetCastleData("schg_cas01",5) >= 2) {
mes "[ Steward ]";
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
mes "until tomorrow if you really";
mes "want to increase our defenses.";
close;
}
if (Zeny < .@def_invest) {
mes "[ Steward ]";
mes "I'm sorry, Master, but";
mes "you do not have enough";
mes "zeny to make an investment";
mes "for the guild today.";
close;
}
set zeny,zeny-.@def_invest;
SetCastleData "schg_cas01",5,GetCastleData("schg_cas01",5)+1;
mes "[ Steward ]";
mes "A wise use of the guild's";
mes "funds, Master. Increasing";
mes "the frequency of treasure";
mes "procured by the guild will";
mes "definitely help us all.";
close;
case 2:
mes "[ Steward ]";
mes "As you command, Master.";
close;
}
case 4:
if (GetCastleData("schg_cas01",9) == 1) {
mes "[ Steward ]";
mes "Do you wish to dismiss";
mes "the Kafra Employee that";
mes "we've hired for the guild?";
next;
switch(select("Dismiss:Cancel")) {
case 1:
cutin "kafra_01",2;
mes "[ Hired Kafra Employee ]";
mes "Master, please reconsider!";
mes "I've been working very hard";
mes "for the success of the guild!";
mes "I'll try harder to serve the";
mes "guild members of this";
mes "stronghold, I promise!";
next;
switch(select("Dismiss:Cancel")) {
case 1:
mes "[ Hired Kafra Employee ]";
mes "Why?! What have I done";
mes "to deserve this? Waaah~!";
next;
cutin "kafra_01",255;
break;
case 2:
mes "[ Hired Kafra Employee ]";
mes "Thank you, Master!";
mes "I'll obey your every";
mes "command as best I can!";
mes "You won't regret this!";
close;
}
break;
case 2:
mes "[ Steward ]";
mes "She works very hard,";
mes "in my opinion. It was in";
mes "all of our best interests to";
mes "allow her to stay with us.";
close;
}
disablenpc "Kafra Employee#sch01";
SetCastleData "schg_cas01",9,0;
mes "[ Steward ]";
mes "That Kafra Employee";
mes "has been dismissed.";
mes "Were really dissatisfied";
mes "by the quality of her service?";
close;
}
else {
mes "[ Steward ]";
mes "Will you hire a";
mes "Kafra Employee to serve";
mes "our stronghold? You must";
mes "pay ^FF000010,000 zeny^000000 to hire one.";
next;
switch(select("Hire:Cancel")) {
case 1:
if (getgdskilllv(.@GID,10001) == 0) {
mes "[ Steward ]";
mes "Master, we cannot hire a";
mes "Kafra Employee because";
mes "you have not yet attained";
mes "the ^FF0000Contract with Kafra^000000";
mes "guild skill.";
close;
}
if (Zeny < 10000) {
mes "[ Steward ]";
mes "Master, we cannot hire a";
mes "Kafra Employee because";
mes "we do not have enough";
mes "funds to pay the contract fee.";
close;
}
set zeny,zeny-10000;
enablenpc "Kafra Employee#sch01";
SetCastleData "schg_cas01",9,1;
mes "[ Steward ]";
mes "Very well. We have formed";
mes "a contract with the Kafra";
mes "Head Office, and hired a";
mes "Kafra Employee for our";
mes "stronghold. Here she is~";
next;
cutin "kafra_01",2;
mes "[ Hired Kafra Employee ]";
mes "How do you do? I've";
mes "been dispatched by the";
mes "Kafra Head Office to";
mes "serve your guild's needs.";
mes "I'll do my best to follow";
mes "your every command, Master.";
next;
cutin "kafra_01",255;
mes "[ Steward ]";
mes "Our contract will expire";
mes "after one month, so we must";
mes "pay additional fees to keep";
mes "this Kafra Employee in";
mes "the service of our guild.";
close;
case 2:
mes "[ Steward ]";
mes "As you command, Master.";
mes "However, I suggest hiring";
mes "a Kafra Employee as soon";
mes "as possible since our guild";
mes "would greatly benefit from";
mes "the convenient Kafra services.";
close;
}
}
case 5:
mes "[ Steward ]";
mes "Do you wish to enter the";
mes "Guild Treasure Room?";
mes "Only you, the Guild Master,";
mes "are permitted to enter.";
next;
mes "[ Steward ]";
mes "Please remember to open";
mes "the Treasure Boxes at the";
mes "proper time. Otherwise, the";
mes "treasure may disappear if";
mes "something unexpected happens.";
next;
switch(select("Go to Treasure Room:Cancel")) {
case 1:
mes "[ Steward ]";
mes "Allow me to guide you";
mes "on the secret path to";
mes "the Treasure Room.";
mes "Press the secret switch";
mes "when you wish to return here.";
close2;
warp "schg_cas01",381,381;
end;
case 2:
mes "[ Steward ]";
mes "Items in the Treasure Room";
mes "are produced once each day.";
mes "Therefore, you must obtain";
mes "the treasure items everyday.";
mes "For the sake of the guild,";
mes "prioritize treasure harvesting!";
close;
}
}
Onstop:
stopnpctimer;
end;
OnStartArena:
if($@empreplaced==1) {
set $@empreplaced,0;
disablenpc "schgx03";
}
set .@GID,getcharid(2);
// Lower castle Economy
set .@Economy,GetCastleData("schg_cas01",2) - 5;
if (.@Economy < 0) set .@Economy, 0;
SetCastleData "schg_cas01", 2, .@Economy;
// Lower Castle Defence
set .@Defence,GetCastleData("schg_cas01",3) - 5;
if (.@Defence < 0) set .@Defence, 0;
SetCastleData "schg_cas01", 3, .@Defence;
// Set new owner
SetCastleData "schg_cas01",1, .@GID;
// Clear castle's data.
for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
SetCastleData "schg_cas01", .@i, 0;
// Disable Kafra
disablenpc "Kafra Employee#sch01";
set .msg,2;
if (.msg == 1) {
announce "Fortress [" + GetCastleName("schg_cas01") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
donpcevent "WOE_ME::Onstart";
}
else if (.msg == 2) {
announce "The [" + getguildname(.@gid) + "] conquered the [Nithafjoll 1] stronghold of "+GetCastleName("schg_cas01"),bc_all|bc_woe;
mapannounce "schg_cas01","The emperium has been destroyed.",bc_map,"0x00CCFF",FW_NORMAL,20,0,40;
if (agitcheck2()) {
donpcevent "WOE_ME::Onreset";
initnpctimer;
}
else {
donpcevent "WOE_ME::Onreset";
stopnpctimer;
}
}
else if (.msg == 0) {
announce "Fortress [" + GetCastleName("schg_cas01") + "]'s 'Nithafjoll' was captured by [" + getguildname(.@gid) + "] Guild.",bc_all|bc_woe;
donpcevent "WOE_ME::Onreset";
stopnpctimer;
end;
}
MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2;
GetCastleData "schg_cas01",0,"::OnRecvCastlesc01";
sleep2 1000;
//Kick some player get come late form party ecall
MapRespawnGuildID "schg_cas01",GetCastleData("schg_cas01",1),2;
end;
OnTimer10000:
donpcevent "WOE_ME::Onchange";
//mapannounce "schg_cas01","Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
end;
}
// Guild Kafra
schg_cas01,300,287,5 script Kafra Employee#sch01 117,{
cutin "kafra_01",2;
set .@GID, GetCastleData("schg_cas01",1);
if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
mes "[Kafra Employee]";
mes "Welcome, proud member";
mes "of the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild!";
mes "The Kafra Corporation is ready";
mes "to assist you wherever you go!";
next;
switch(select("Use Storage:Use Warp Service:Rent Pushcart:Cancel")) {
case 1:
if (basicskillcheck() && getskilllv("NV_BASIC") < 6) {
mes "[Kafra Employee]";
mes "I'm so sorry, but you must";
mes "have at least Novice Skill";
mes "Lv.6 to use the Storage.";
}
else {
openstorage;
}
break;
case 2:
mes "[Kafra Employee]";
mes "Please tell me your";
mes "Warp destination.";
next;
switch(select("Juno -> 200 z:Cancel")) {
case 1:
if (Zeny < 200) {
mes "[Kafra Employee]";
mes "I'm sorry, but you don't";
mes "have enough zeny to pay";
mes "the warp fee. Would you";
mes "please check your funds again?";
close2;
cutin "kafra_01",255;
end;
}
set zeny,zeny-200;
warp "yuno",158,125;
end;
case 2:
cutin "kafra_01",255;
}
break;
case 3:
if (BaseClass != Job_Merchant) {
mes "[Kafra Employee]";
mes "I'm sorry, but the Pushcart";
mes "rental service can only be";
mes "used by Merchant, Blacksmith,";
mes "and Alchemist class characters.";
}
else if (checkcart() == 1) {
mes "[Kafra Employee]";
mes "Hm? You've already";
mes "rented a Pushcart.";
}
else {
mes "[Kafra Employee]";
mes "The Pushcart rental fee";
mes "is 800 zeny. Would you";
mes "like to rent a Pushcart?";
next;
switch(select("Rent Pushcart:Cancel")) {
case 1:
if (Zeny < 800) {
mes "[Kafra Employee]";
mes "I'm sorry, but you don't";
mes "have enough zeny to rent";
mes "one of our Pushcarts.";
close2;
cutin "kafra_01",255;
end;
}
set zeny,zeny-800;
setcart;
break;
case 2:
break;
}
}
break;
case 4:
mes "[Kafra Employee]";
mes "Thank you for using the";
mes "Kafra Service. Wherever";
mes "you go, Kafra will be";
mes "there to support you!";
close2;
cutin "kafra_01",255;
end;
}
close2;
cutin "kafra_01",255;
end;
}
else {
mes "[Kafra Employee]";
mes "I'm sorry, but I've been";
mes "exclusively contracted";
mes "to the members of the";
mes "^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
mes "You'll have to ask another";
mes "Kafra Employee to help you...";
close2;
cutin "kafra_01",255;
end;
}
OnRecvCastlesc01:
if (GetCastleData("schg_cas01",1) == 0) {
monster "schg_cas01",0,0,"Evil Druid",1117,10;
monster "schg_cas01",0,0,"Khalitzburg",1132,4;
monster "schg_cas01",0,0,"Abysmal Knight",1219,3;
monster "schg_cas01",0,0,"Executioner",1205,1;
monster "schg_cas01",0,0,"Penomena",1216,10;
monster "schg_cas01",0,0,"Alarm",1193,18;
monster "schg_cas01",0,0,"Clock",1269,9;
monster "schg_cas01",0,0,"Raydric Archer",1276,12;
monster "schg_cas01",0,0,"Wanderer",1208,3;
monster "schg_cas01",0,0,"Alice",1275,1;
monster "schg_cas01",0,0,"Bloody Knight",1268,2;
monster "schg_cas01",0,0,"Dark Lord",1272,2;
monster "schg_cas01",0,0,"Tower Keeper",1270,4;
}
if (GetCastleData("schg_cas01",9) < 1) {
disablenpc "Kafra Employee#sch01";
}
end;
}
schg_cas01,391,391,0 script #sch01_switch 111,{
mes " ";
mes "^3355FFWill you pull";
mes "this small lever?^000000";
next;
switch(select("Pull Lever:Cancel")) {
case 1:
warp "schg_cas01",275,244;
end;
case 2:
close;
}
}
sch_gld,290,90,0 script Himinn#flag_sc01_1::Sc01_Flag 722,{
set .@GID, GetCastleData("schg_cas01",1);
if (.@GID == 0) {
mes "[ Schwaltzvalt Royal Edict ]";
mes "The Holy Kingdom of";
mes "Schwaltzvalt declares that";
mes "one has yet to claim lordship";
mes "over this stronghold. The one";
mes "that breaks the Emperium will";
mes "be recognized as its new owner.";
close;
}
else {
if (getcharid(2) == .@GID) {
mes "[ Ringing Voice ]";
mes "Courageous one,";
mes "do you wish to return";
mes "to your stronghold?";
next;
switch(select("Return to the Stronghold:Cancel")) {
case 1:
set .@GID, GetCastleData("schg_cas01",1);
if (getcharid(2) == .@GID) {
warp "schg_cas01",86,203;
end;
}
close;
case 2:
close;
}
}
mes "[ Schwaltzvalt Royal Edict ]";
mes "The Holy Kingdom of";
mes "Schwaltzvalt decrees that";
mes "this stronghold is owned";
mes "by the ^FF0000" + GetGuildName(.@GID) + "^000000 Guild.";
next;
mes "[ Schwaltzvalt Royal Edict ]";
mes "^FF0000" + GetGuildMaster(.@GID) + "^000000 is";
mes "Guild Master of ^FF0000" + GetGuildName(.@GID) + "^000000.";
mes "Any that object must claim this";
mes "stronghold through strength of";
mes "steel and magic during the";
mes "appointed Guild Siege times.";
close;
}
OnRecvCastlesc01:
FlagEmblem GetCastleData("schg_cas01",1);
end;
}
sch_gld,297,90,0 duplicate(Sc01_Flag) Himinn#flag_sc01_2 722
Question
Kakaroto
Hello folks, I found a very cool script posted here on this topic kkeong Rathena by:
http://rathena.org/board/topic/59059-war-of-emperium-modern-edition/
only when I put on my NPC emulator it is giving an error, can someone please help me?
is attached: image and script error
I thank you much help.
Image of erro:
Script:
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.