Jump to content
  • 0

'If' problem!


Start_

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  928
  • Reputation:   170
  • Joined:  04/05/13
  • Last Seen:  

What's wrong with this when I talk to NPC it will run all of script to the end

 

and how to show variable #L_Healing in message

 

I just tried this

 

 

mes "^.#L_Healing";
mes "^+#L_Healing+";

 

prontera,156,181,4    script    แพทย์ผู้เชี่ยวชาญ    618,{
if(#L_Healing==0) goto L_End;
if(#L_Healing==1) goto L_Healing1;
L_Healing1:
percentheal 100,100;
if(#L_Healing==2) goto L_Healing2;
L_Healing2:
sc_end 0;
sc_end 1;
if(#L_Healing==3) goto L_Healing3;
L_Healing3:
sc_start 21,1800000,10;
if(#L_Healing==4) goto L_Healing4;
L_Healing4:
sc_start 22,1800000,10;
if(#L_Healing==5) goto L_Healing5;
L_Healing5:
sc_start 23,1800000,10;
    end;

    L_End:
    end;
}

prontera,158,181,4    script    แพทย์ผู้ช่วย    611,{
mes "^C080FF[ซางิ]^000000";
next;
menu "อัพเกรด",L_Upgrade,"การอัพเกรดอะไรเหรอ?",L_Info,"ยกเลิก",L_Cancel;

L_Upgrade:
mes "^C080FF[ซางิ]^000000";
next;
menu "อัพเกรดเลย",L_Do,"ยังก่อน",L_Dont;

L_Do:
set #L_Healing,#L_Healing + 1;
mes "^C080FF[ซางิ]^000000";
close;

L_Dont:
close;

L_Info:
mes "^C080FF[ซางิ]^000000";
close;

L_Cancel:
close;

}

Thanks for the help.

 

I fixed it to this and it's working now but too many line in script  /oops

 

prontera,156,181,4	script	แพทย์ผู้เชี่ยวชาญ	618,{
emotion 74;
if(#L_Healing==0) goto L_H1;
if(#L_Healing==1) goto L_H2;
if(#L_Healing==2) goto L_H3;
if(#L_Healing==3) goto L_H4;
if(#L_Healing==4) goto L_H5;
if(#L_Healing==5) goto L_H6;
if(#L_Healing==6) goto L_H7;
if(#L_Healing==7) goto L_H8;
if(#L_Healing==8) goto L_H9;
if(#L_Healing==9) goto L_H10;
if(#L_Healing==10) goto L_H11;
if(#L_Healing==11) goto L_H12;
if(#L_Healing==12) goto L_H13;
if(#L_Healing==13) goto L_H14;
if(#L_Healing==14) goto L_H15;
if(#L_Healing==15) goto L_H16;
if(#L_Healing==16) goto L_H17;
if(#L_Healing==17) goto L_H18;
if(#L_Healing==18) goto L_H19;
if(#L_Healing==19) goto L_H20;
if(#L_Healing==20) goto L_H21;
if(#L_Healing==21) goto L_H22;
if(#L_Healing==22) goto L_H23;
if(#L_Healing==23) goto L_H24;
if(#L_Healing==24) goto L_H25;
if(#L_Healing==25) goto L_H26;
if(#L_Healing==26) goto L_H27;
if(#L_Healing==27) goto L_H28;
if(#L_Healing==28) goto L_H29;
if(#L_Healing==29) goto L_H30;
if(#L_Healing==30) goto L_H31;
if(#L_Healing==31) goto L_H32;
if(#L_Healing==32) goto L_H33;
if(#L_Healing==33) goto L_H34;
if(#L_Healing==34) goto L_H35;
if(#L_Healing==35) goto L_H36;
if(#L_Healing==36) goto L_H37;
if(#L_Healing==37) goto L_H38;
if(#L_Healing==38) goto L_H39;
if(#L_Healing==39) goto L_H40;
if(#L_Healing==40) goto L_H41;
if(#L_Healing==41) goto L_H42;
if(#L_Healing==42) goto L_H43;
if(#L_Healing==43) goto L_H44;
if(#L_Healing==44) goto L_H45;
if(#L_Healing==45) goto L_H46;
if(#L_Healing==46) goto L_H47;
if(#L_Healing==47) goto L_H48;
if(#L_Healing==48) goto L_H49;
if(#L_Healing==49) goto L_H50;
if(#L_Healing==50) goto L_H51;
if(#L_Healing==51) goto L_H52;
if(#L_Healing==52) goto L_H53;
if(#L_Healing==53) goto L_H54;
L_H1:
close; 
L_H2:
percentheal 100,100;
close; 
L_H3:
percentheal 100,100;
sc_end 0;sc_end 1;sc_end 2;sc_end 3;sc_end 4;sc_end 5;sc_end 6;sc_end 7;sc_end 8;sc_end 9;sc_end 10;sc_end 50;sc_end 51;sc_end 52;sc_end 68;sc_end 69;sc_end 70;sc_end 71;sc_end 309;sc_end 310;sc_end 311;
close; 
L_H4:
percentheal 100,100;
sc_end 0;sc_end 1;sc_end 2;sc_end 3;sc_end 4;sc_end 5;sc_end 6;sc_end 7;sc_end 8;sc_end 9;sc_end 10;sc_end 50;sc_end 51;sc_end 52;sc_end 68;sc_end 69;sc_end 70;sc_end 71;sc_end 309;sc_end 310;sc_end 311;
sc_start 21,1800000,10;
close; 
L_H5:
percentheal 100,100;
sc_end 0;sc_end 1;sc_end 2;sc_end 3;sc_end 4;sc_end 5;sc_end 6;sc_end 7;sc_end 8;sc_end 9;sc_end 10;sc_end 50;sc_end 51;sc_end 52;sc_end 68;sc_end 69;sc_end 70;sc_end 71;sc_end 309;sc_end 310;sc_end 311;
sc_start 21,1800000,10;
sc_start 22,1800000,10;
close; 
L_H6:
percentheal 100,100;
sc_end 0;sc_end 1;sc_end 2;sc_end 3;sc_end 4;sc_end 5;sc_end 6;sc_end 7;sc_end 8;sc_end 9;sc_end 10;sc_end 50;sc_end 51;sc_end 52;sc_end 68;sc_end 69;sc_end 70;sc_end 71;sc_end 309;sc_end 310;sc_end 311;
sc_start 21,1800000,10;
sc_start 22,1800000,10;
sc_start 23,1800000,10;
end;
L_H7:
percentheal 100,100;
sc_end 0;sc_end 1;sc_end 2;sc_end 3;sc_end 4;sc_end 5;sc_end 6;sc_end 7;sc_end 8;sc_end 9;sc_end 10;sc_end 50;sc_end 51;sc_end 52;sc_end 68;sc_end 69;sc_end 70;sc_end 71;sc_end 309;sc_end 310;sc_end 311;
sc_start 21,1800000,10;
sc_start 22,1800000,10;
sc_start 23,1800000,10;
sc_start 29,1800000,10;
end;
.
.
.
.
.
.
.
.
.
Edited by TARTs
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


set #L_Healing,#L_Healing + 1;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


mes "Value = "+#L_Healing+" points";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  928
  • Reputation:   170
  • Joined:  04/05/13
  • Last Seen:  

Thanks the variable has shown.

 

But still bug at buff.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

set #L_Healing,"+1";

 

should be

set #L_Healing,1;

 

it's an INTEGER...not a STRING

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  928
  • Reputation:   170
  • Joined:  04/05/13
  • Last Seen:  

Okay then if I set 

 

set #L_Healing,1;

 

how to plus it

 

/////////////////////////////////////////

 

Edit

 

I just found on this board.

set #L_Healing,#L_Healing + 1;
 

is working to plus variable!

Edited by TARTs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...