Jump to content
  • 0

Free Kafra Teleport for lvl<30


H4Mm3r

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   1
  • Joined:  09/22/15
  • Last Seen:  

Hello,

 

I would like to set free teleport for players lvl<30.

 

In functions_kafras.txt I've found :


//===================================================
// Teleport Function
//===================================================
function        script  F_KafTele       {
        mes "[Kafra Employee]";
        mes "Choisissez votre destination :";
        next;
        set .@menu$, "";
        for (set .@i, 0; .@i <= 6; set .@i, .@i + 1)
                set .@menu$, .@menu$ + @wrpC$[.@i] + ":";
        set .@j, select (.@menu$) - 1;
        if (@wrpC$[.@j] == "Quitter") return;
        // Consume "Free Ticket for Kafra Transportation" if available.
        // Do not consume if in Guild castle
        if(countitem(7060) > 0 && getarg(0) != 2) delitem 7060,1;
        else {
                if (Zeny<@wrpP[.@j]){
                        mes "[Kafra Employee]";
                        mes "Je suis desolee mais vous n'avez pas";
                        mes "assez de zenys pour utiliser le service de Teleportation";
                        mes "Le tarif pour "+@wrpD$[.@j]+" est de "+@wrpP[.@j]+" zenys.";
                        close2;
                        cutin "", 255;
                        end;
                }
                set Zeny, Zeny - @wrpP[.@j];
                set RESRVPTS, RESRVPTS + (@wrpP[.@j]/16);
        }
        cutin "", 255;
        if (@wrpD$[.@j] == "Al De Baran") warp "aldebaran",168,112;
        else if (@wrpD$[.@j] == "Alberta") warp "alberta", 117, 56;
        else if (@wrpD$[.@j] == "Comodo") warp "comodo", 209, 143;
        else if (@wrpD$[.@j] == "Comodo Pharos Beacon") warp "cmd_fild07", 127, 134;
        else if (@wrpD$[.@j] == "Geffen") warp "geffen", 120, 39;
        else if (@wrpD$[.@j] == "Izlude") { if (checkre(0)) warp "izlude", 128, 98; else warp "izlude", 91, 105; }
        else if (@wrpD$[.@j] == "Juno") warp "yuno", 158, 125;
        else if (@wrpD$[.@j] == "Mjolnir Dead Pit") warp "mjolnir_02", 99, 351;
        else if (@wrpD$[.@j] == "Morroc") warp "morocc", 156, 46;
        else if (@wrpD$[.@j] == "Orc Dungeon") warp "gef_fild10", 52, 326;
        else if (@wrpD$[.@j] == "Payon") warp "payon", 161, 58;
        else if (@wrpD$[.@j] == "Prontera") warp "prontera", 116, 72;
        else if (@wrpD$[.@j] == "Umbala") warp "umbala", 100, 154;
        end;
}
 

Can someone help me wiht that ?

 

Thanks by advance.

 

Regards

Edited by H4Mm3r
codebox
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   7
  • Joined:  11/23/11
  • Last Seen:  

modify to remove prices

 

file functions_kafras.txt

 

in function F_KafSet

 

search // VIP pricing varies across the regional servers; this is most practical.

 

add before // VIP pricing varies across the regional servers; this is most practical.

	if (BaseLevel <= 30)
		for (set .@i, 0; .@i < getarraysize(@wrpP); set .@i, .@i + 1)
			set @wrpP[.@i], 0;

// VIP pricing varies across the regional servers; this is most practical.

added a sentence

 

file functions_kafras.txt

 

 

in function F_KafTele (add after line 6)

 

	mes "dont worry about prices if your'e under lvl 30";

or show text only lvl <30

	if (BaseLevel <= 30)
		mes "dont worry about prices if your'e under lvl 30";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   7
  • Joined:  11/23/11
  • Last Seen:  

Line 17

edit 

else {

to

else if (BaseLevel > 30) {

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   1
  • Joined:  09/22/15
  • Last Seen:  

It is absolutely doing it :D Thanks a lot !

 

Do you think it could be possible to easily modify the menu ?

 

I've added a sentence "dont worry about prices if your'e under lvl 30", but if I could modify the menu to remove prices, it could be wonderful. I tried to understand how destinations are provided and prices set, but it's a little bit difficult...

 

Thanks a lot !

 

Regards

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   1
  • Joined:  09/22/15
  • Last Seen:  

It's absolutely doing the job. Thanks a lot for all thoses answers. Thanks !

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...