瀏覽代碼

- Updated some functions calls that where using the wrong number of arguments with checkcart,checkfalcon,checkriding,getgmlevel,basicskillcheck.

hmm, maybe I should add a config option for lazy scripter that still want to run script code that uses too many arguments

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9637 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS 18 年之前
父節點
當前提交
1f54e62d13

+ 4 - 0
npc/Changelog.txt

@@ -34,6 +34,10 @@ KarLaeda
 Date		Added
 ======
 
+2007/01/09
+	* Updated some functions calls that where using the wrong number of 
+	  arguments with checkcart,checkfalcon,checkriding,getgmlevel,
+	  basicskillcheck. [FlavioJS]
 2007/01/05
 	* Updated SL job Quest according to iRO, thanks to Sousuke_PL [Lupus]
 2007/01/03

+ 9 - 9
npc/cities/valkyrie.txt

@@ -257,9 +257,9 @@ L_CHANGE:
 	next;
 	mes "[Valhallana]";
 	if(Zeny || Weight) goto L_ZENYITEMS;
-	if(checkcart(0)) goto L_CART;
-	if(checkfalcon(0)) goto L_FALCON;
-	if(checkriding(0)) goto L_PECO;
+	if(checkcart()) goto L_CART;
+	if(checkfalcon()) goto L_FALCON;
+	if(checkriding()) goto L_PECO;
 	if(skillpoint > 0) goto L_SKILLPNTS;
 
 	mes "Let's start your reincarnation ceremony...";
@@ -368,9 +368,9 @@ function	script	F_ToHigh	{
 L_GETHIGH:
 	mes "["+getarg(3)+"]";
 	if(JobLevel < 10) goto L_NOTREADY;
-	if(checkcart(0)) goto L_CART;
-	if(checkfalcon(0)) goto L_FALCON;
-	if(checkriding(0)) goto L_PECO;
+	if(checkcart()) goto L_CART;
+	if(checkfalcon()) goto L_FALCON;
+	if(checkriding()) goto L_PECO;
 	if(skillpoint > 0) goto L_SKILLPNTS;
 
 	mes "Hello there, "+strcharinfo(0)+"!";
@@ -450,9 +450,9 @@ function	script	F_Rebirth	{
 
 L_GET3RD:
 	if(JobLevel < 45) goto L_NOTREADY;
-	if(checkcart(0)) goto L_CART;
-	if(checkfalcon(0)) goto L_FALCON;
-	if(checkriding(0)) goto L_PECO;
+	if(checkcart()) goto L_CART;
+	if(checkfalcon()) goto L_FALCON;
+	if(checkriding()) goto L_PECO;
 	if(skillpoint > 0) goto L_SKILLPNTS;
 
 	mes "Congratulations!";

+ 1 - 1
npc/custom/WoE_Setter.txt

@@ -26,7 +26,7 @@
 //============================================================ 
 prontera.gat,162,194,5	script	WoE Setter	806,{
 	mes "[Woe Setter]";
-	if(getgmlevel(99)<1) goto L_NotGM;
+	if(getgmlevel()<99) goto L_NotGM;
 	mes "Welcome, I can set WoE times for you";
 	mes "Simply follow the intruction given in each section after this, and it should be set and ready to use";
 	next;

+ 1 - 1
npc/custom/adoption.txt

@@ -55,7 +55,7 @@ prt_church.gat,162,171,0	warp	prtch01-3	1,2,prt_church.gat,113,122
 prt_church.gat,166,176,3	script	Adoption Man	61,{
 
 	//If u're a GM you can always reset current Adoption process
-	if(getgmlevel(99)>=90) {
+	if(getgmlevel()>=90) {
 		mes "[GM Menu]";
 		mes "Would you like to reset curent adoption?";
 		next;

+ 3 - 3
npc/custom/breeder.txt

@@ -25,7 +25,7 @@ L_Menu:
 	close;
 
 L_Cart:
-	if((BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) && checkcart(0) == 0) goto L_Cart_Ok;
+	if((BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) && checkcart() == 0) goto L_Cart_Ok;
 	if(getskilllv(39)<1) goto L_Need_Skill;
 
 	mes "[Universal Rental Npc]";
@@ -42,7 +42,7 @@ L_Need_Skill:
 	close;
 
 L_Falcon:
-	if(BaseJob != Job_Archer && BaseClass == Job_Archer && checkfalcon(0) == 0) goto L_Falc;
+	if(BaseJob != Job_Archer && BaseClass == Job_Archer && checkfalcon() == 0) goto L_Falc;
 	if(getskilllv(127)<1) goto L_Need_Skill2;
 
 	mes "[Universal Rental Npc]";
@@ -59,7 +59,7 @@ L_Need_Skill2:
 	close;
 
 L_Peco:
-	if (BaseJob != Job_Swordman && BaseClass == Job_Swordman && checkriding(0) == 0) goto L_Peco_Ok;
+	if (BaseJob != Job_Swordman && BaseClass == Job_Swordman && checkriding() == 0) goto L_Peco_Ok;
 	if(getskilllv(63)<1) goto L_Need_Skill3;
 
 	mes "[Universal Rental Npc]";

+ 2 - 2
npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt

@@ -300,7 +300,7 @@ L_HEAL_ALL:
 //Function storage: allows access to the storage facility
 //The sent argument is the displaying image, so we can clear it afterwards.
 function	script	F_keStorage	{
-	if(basicskillcheck(0) > 0 && getskilllv(1) < 6) {
+	if(basicskillcheck() > 0 && getskilllv(1) < 6) {
 		callfunc "F_keIntro", -1, "I am sorry, but you beed basic skill level 6 to use the storage.";
 		return;
 	}
@@ -318,7 +318,7 @@ function	script	F_keStorage	{
 
 //Function G Storage: Allows access to the Guild Storage
 function	script	F_keGuildStorage	{
-	if(basicskillcheck(0) > 0 && getskilllv(1) < 6) {
+	if(basicskillcheck() > 0 && getskilllv(1) < 6) {
 		callfunc "F_keIntro", -1, "I am sorry, but you beed basic skill level 6 to use the storage.";
 		return;
 	}

+ 2 - 2
npc/custom/eAAC_Scripts/messageboards.txt

@@ -326,8 +326,8 @@ mes "Posted By: "+$messageboardpostname$[@tempview]+".";
 mes "On: "+$messageboardpostdate$[@tempview]+".";
 mes $messageboardpost$[@tempview]+".";
 next;
-if(($mymessage[@tempview] == 5) && (getgmlevel(99)>0)) menu "Next Message",L_top2,"Delete My Message",L_delmy,"Edit my message",L_editmy,"Delete This message",L_Del;
-if((getgmlevel(99)>0))  menu "Next Message",L_top2,"Delete This message",L_Del;
+if(($mymessage[@tempview] == 5) && (getgmlevel()>=99)) menu "Next Message",L_top2,"Delete My Message",L_delmy,"Edit my message",L_editmy,"Delete This message",L_Del;
+if((getgmlevel()>=99))  menu "Next Message",L_top2,"Delete This message",L_Del;
 if(($mymessage[@tempview] == 5)) menu "Next Message",L_top2,"Delete My Message",L_delmy,"Edit my message",L_editmy;
 menu "Next message",L_top2;
 close;

+ 4 - 4
npc/custom/eAAC_Scripts/quest_warper.txt

@@ -578,7 +578,7 @@ Zeny_short_SP:
 
 L_Storage:
 	next;
-	if(basicskillcheck(0) > 0 && getskilllv(1) < 6) goto L_StorageJBlow;
+	if(basicskillcheck() > 0 && getskilllv(1) < 6) goto L_StorageJBlow;
 	set @fee, $QW_S_PRICE;
 	if ($QW_S_PRICE == 60 && BaseJob == Job_Novice) set @fee, 30;
 	if(Zeny<@fee) callsub L_Short_on_zeny,2;
@@ -732,9 +732,9 @@ function	script	QWS_MMarray	{
 	set @Mi,0; // That's our loop counter.
 	set @Mj,0; // That's the menu lines counter.
 //----------------GameMaster-Menu
-	if (getgmlevel(80)) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
-	if (getgmlevel(80)) set @Mmenuref[@Mj],@Mi;
-	if (getgmlevel(80)) set @Mj,@Mj+1;
+	if (getgmlevel()>=80) set @Mmenulist$[@Mj],@pMmenuitems$[@Mi];
+	if (getgmlevel()>=80) set @Mmenuref[@Mj],@Mi;
+	if (getgmlevel()>=80) set @Mj,@Mj+1;
 	set @Mi,@Mi+1;
 //----------------Special-Warp
 	callfunc "QWS_TownStamps";

+ 1 - 1
npc/custom/jobs/jobmaster.txt

@@ -162,7 +162,7 @@ prontera.gat,153,193,6	script	Job Master	123,{
 				}
 				close;
 			}
-			if(checkfalcon(0) || checkcart(0) || checkriding(0)) goto L_remove;
+			if(checkfalcon() || checkcart() || checkriding()) goto L_remove;
 			if((Class >=Job_Knight) && (Class <=Job_Crusader2)){
 				mes "Do you want to reborn?";
 				if(select("Yes","No")==1){

+ 1 - 1
npc/custom/lottery.txt

@@ -98,7 +98,7 @@ if ($LID > 99999) mes "Your Ticket ("+#LID+"):";
 if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "] [" + #LW3 + "] [" + #LW4 + "] [" + #LW5 + "] [" + #LW6 + "]^000000";
 mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";
 next;
-if (getgmlevel(3) > 90) goto L_GM;
+if (getgmlevel() > 90) goto L_GM;
 menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel;
 
 // PURCHASE TICKET

+ 1 - 1
npc/custom/market.txt

@@ -23,7 +23,7 @@ prontera.gat,144,174,3	script	Market Place	722,{
 	end;
 
 M_ENTER:
-	if(rand(10)==0 && checkcart(0) && @mrketflg<30 && @mrketflg>5 && getcharid(2)>1) FlagEmblem getcharid(2);
+	if(rand(10)==0 && checkcart() && @mrketflg<30 && @mrketflg>5 && getcharid(2)>1) FlagEmblem getcharid(2);
 	warp "gon_test",27+rand(5),98;
 	set @mrketflg,@mrketflg+1;
 	end;

+ 1 - 1
npc/custom/penal_servitude.txt

@@ -87,7 +87,7 @@ M_Q1:
 	menu "OK, I'll work off!",-, "I love this prison!",M_NO_THANKS;
 
 	mes "[Saddeus]";
-	if(checkcart(0) || checkfalcon(0) || checkriding(0)){
+	if(checkcart() || checkfalcon() || checkriding()){
 		emotion e_hmm;
 		mes "I'm sorry, you should release your Cart, PecoPeco or Falcon!";
 		close;

+ 1 - 1
npc/custom/shifty_assassin.txt

@@ -20,7 +20,7 @@ M_Start:
 mes "[Shifty Assassin]";
 mes "What do you want?";
 next;
-if (getgmlevel(3) > 90) goto M_GM;
+if (getgmlevel() > 90) goto M_GM;
 menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Cancel",M_Exit;
 M_GM:
 menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Add Ninjas",M_Add,"Cancel",M_Exit;

+ 2 - 2
npc/custom/stock_market.txt

@@ -178,7 +178,7 @@ set @stotal,$S1+$S2+$S3+$S4+$S5+$S6+$S7+$S8+$S9+$S10;
 if (@stotal > 0) goto S_Start;
 mes "[Stock Market]";
 mes "Trading is currently closed.";
-if (getgmlevel(3) > 90) goto GM_Open;
+if (getgmlevel() > 90) goto GM_Open;
 close;
 
 // Begining of interface //
@@ -253,7 +253,7 @@ mes "^21698F"+$S10N$+"^000000" + " " + $S10 + "z (" + @S10Update$ + ")";
 next;
 
 // GM Menu link //
-if (getgmlevel(3) > 90) goto GM_subMenu;
+if (getgmlevel() > 90) goto GM_subMenu;
 menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"Cancel",S_Quit;
 
 GM_subMenu:

+ 4 - 4
npc/events/event_skill_reset.txt

@@ -32,7 +32,7 @@ yuno.gat,138,187,4	script	Hypnotist Teacher	124,{
 		mes "Please come again soon!";
 		close;
 	}
-	if(Weight || checkfalcon(0) || checkcart(0) || checkriding(0)) {
+	if(Weight || checkfalcon() || checkcart() || checkriding()) {
 		mes "Would you like to reset skills?";
 		mes "I'm sorry, but...";
 		next;
@@ -41,11 +41,11 @@ yuno.gat,138,187,4	script	Hypnotist Teacher	124,{
 			mes "You cannot reset skills";
 			mes "when you keep";
 			mes "any items.";
-		} else if(checkcart(0))
+		} else if(checkcart())
 			mes "Please, drop your cart and we'll continue.";
-		else if(checkfalcon(0))
+		else if(checkfalcon())
 			mes "Please, free your Falcon and we'll continue.";
-		else if(checkriding(0))
+		else if(checkriding())
 			mes "Please, free your PecoPeco and we'll continue.";
 		next;
 		mes @npcname$;

+ 1 - 1
npc/jobs/novice/supernovice.txt

@@ -218,7 +218,7 @@ L_Otherjob:
 // -- Car Rental --
 aldebaran.gat,54,238,5	script	Kafra	117,{
 	if(BaseJob != Job_SuperNovice) goto L_Otherjob;
-	if(checkcart(0) == 1) goto L_GotCart;
+	if(checkcart() == 1) goto L_GotCart;
 	mes "[Kafra]";
 	mes "Oh, a Super Novice!";
 	mes "You're annoyed that the other Kafras won't lend you a cart?";

+ 2 - 2
npc/kafras/functions_kafras.txt

@@ -205,7 +205,7 @@ function	script	F_KafStor	{
 		cutin "", 255;
 		close;
 	}
-	if(basicskillcheck(0) && getskilllv(1) < 6){
+	if(basicskillcheck() && getskilllv(1) < 6){
 		mes "[Kafra]";
 		mes "I am sorry but you have to be at least Novice level 6 if you want to use the storage.";
 		return;
@@ -316,7 +316,7 @@ function	script	F_KafCart	{
 		mes "I'm sorry but you need the skill ^0000FF'Pushcart'^000000 to rent a cart.";
 		return 1;
 	}
-	if(checkcart(0) == 1){
+	if(checkcart() == 1){
 		mes "[Kafra]";
 		mes "Excuse me... but you already have a cart....";
 		emotion e_swt;

+ 3 - 3
npc/merchants/renters.txt

@@ -46,7 +46,7 @@ L_Start:
 	M_0:
 		if(getskilllv(63) == 0) goto sL_NeedSkill;
 		if(Zeny < @price) goto sL_Zeny;
-		if(checkriding(0) != 0) goto sL_GotPeco;
+		if(checkriding() != 0) goto sL_GotPeco;
 		set Zeny, Zeny - @price;
 		setriding;
 		mes "Thank you and good day.";
@@ -99,7 +99,7 @@ L_Start:
 	M_0:
 		if(getskilllv(63) == 0) goto sL_NeedSkill;
 		if(Zeny < @price) goto sL_Zeny;
-		if(checkriding(0) != 0) goto sL_GotPeco;
+		if(checkriding() != 0) goto sL_GotPeco;
 		set Zeny, Zeny - @price;
 		setriding;
 		mes "Thank you and good day.";
@@ -147,7 +147,7 @@ hu_in01.gat,375,318,5	script	Falcon Master	59,{
 
 		sM_0:
 			if(BaseJob != Job_Hunter) goto sL_NotHunter;
-			if(checkfalcon(0) != 0) goto sL_GotFalc;
+			if(checkfalcon() != 0) goto sL_GotFalc;
 			if(Zeny < @price) goto sL_Zeny;
 			if(getskilllv(127)==0) goto sL_NoSkill;
 			set Zeny, Zeny - @price;