Jump to content
  • 0

Understanding quest viarables?


Poseidon

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   6
  • Joined:  12/09/11
  • Last Seen:  

Hi guys

 

Im currently working on my server ad i would like to have a warper that stops you warping if you havent done the corresponding quest, ie rachel quest but here comes my problem

 

ive been looking though other scripts with this function but the problem i have is understanding it

 

ie

if(KielHyreQuest >= 38)
{
if (Zeny < 30000) goto NoZenys;
Set Zeny,zeny-30000;						
warp "kh_dun01",4,226;
end;		
}

where would i get this information from and what does the number 38 come from?

 

sorry this is a noob question but im trying to learn

 

hope you understand

 

thanks

Poseidon

  • Upvote 1
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

The '38' is just a standard variable value; different quests have different values when they are complete. There's no other way of doing this - the way you're going about this is correct.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  125
  • Reputation:   7
  • Joined:  11/19/11
  • Last Seen:  

noob way is to post the entire script since its difficult to investigate provided with little info. if you dont mind , please post the whole script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   6
  • Joined:  12/09/11
  • Last Seen:  


prontera,161,193,4 script Kafra Service#01::Service 117,{

cutin "kafra_01",2;

mes "[Kafra Service]";

mes "Hello " + strcharinfo(0) + ",";

mes "What can I do for you?";

next;

switch(select("Save current position:Storage:Warp Service:Rent a Pushcart"))

{

Case 1:

mes "You position is saved!";

getmapxy(@mapname$,@mapx,@mapy,0);

mes "Current Coordinates: "+@mapname$+", "+@mapx+", " +@mapy;

savepoint @mapname$,@mapx,@mapy;

close2;

cutin "kafra_01",255;

end;

Case 2:

mes "[Kafra Service]";

mes "I'll open your storage...";

mes "Have a nice day!";

callfunc("F_CheckKafCode"); //check storage password, if set

close2;

cutin "kafra_01",255;

openstorage;

end;

Case 3:

mes "[Kafra Service]";

mes "Where do you want to go?";

next;

switch(select("City Warps:Dungeon Warps")) {

case 1:

mes "[Kafra Service]";

mes "Please choose your destination.";

next;

//This part of the script is kinda unprofessional, I know how to do it better now, but I'm way too lazy to make it better. Whatever, it works without any problems, but the way it is done is crappy.

switch(select("Alberta:Aldebaran:Amatsu:Ayothaya:Comodo:Einbroch:Geffen:Gonryun:Hugel:Izlude:Lighthalzen:Louyang:Lutie:Morroc:Moscovia:Payon:Prontera:Rachel:Umbala:Veins:Yuno")) {

case 1:

warp "alberta",116,57;

end;

case 2:

warp "aldebaran",139,123;

end;

case 3:

warp "amatsu",108,150;

end;

case 4:

warp "ayothaya",201,175;

end;

case 5:

warp "comodo",190,155;

end;

case 6:

warp "einbroch",64,200;

end;

case 7:

warp "geffen",119,66;

end;

case 8:

warp "gonryun",158,120;

end;

case 9:

warp "hugel",96,158;

end;

case 10:

warp "izlude",128,111;

end;

case 11:

warp "lighthalzen",158,92;

end;

case 12:

warp "louyang",217,97;

end;

case 13:

warp "xmas",150,133;

end;

case 14:

warp "morocc",159,93;

end;

case 15:

warp "moscovia",219,189;

end;

case 16:

warp "payon",177,101;

end;

case 17:

warp "prontera",156,184;

end;

case 18:

warp "rachel",129,112;

end;

case 19:

warp "umbala",97, 153;

end;

case 20:

warp "veins",217,129;

end;

case 21:

warp "yuno",158,187;

end;

}

case 2:

mes "[Kafra Service]";

mes "I demand a small charge for dungeon warps.";

mes "You must also have the related dungeon quest!";

mes "Please choose your destination.";

next;

switch(select("Abyss Lake (20,000z):Amatsu Dungeon (20,000z):Anthell (free):Ayothaya Dungeon (20,000z):Byalan Dungeon (20,000z):Clock Tower (free):Coal Mine (5,000z):Culvert (5,000z):Cursed Abbey (40,000z):Einbroch Dungeon (20,000z):Geffen Dungeon (free):Glast Heim (30,000z):Ice Cave (30,000z):Juperos (20,000z):Kiel Dungeon (20,000z):Kunlun Dungeon (free):Lou Yang Dungeon (free):Lighthalzen Bio Lab (20,000z):Magma Dungeon (20,000z):Moscovia Dungeon (20,000z):Nidhoggur Dungeon (50,000z):Odins Temple (20,000z):Orc Dungeon (free):Payon Dungeon (free):Pharos Light House (free):Pyramid Dungeon (free):Rachel Sanctuary (20,000z):Sphinx (free):Sunken Ship (free):Thanatos Tower (30,000z):Thors Volcano (30,000z):Toy Factory (free):Turtle Dungeon (20,000z)")) {

case 1:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "hu_fild05",186,202;

end;

case 2:

if( event_amatsu >= 6)

{

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "ama_dun01",229,12;

end;

}

else goto NoQuest;

case 3:

warp "anthell01",36,258;

end;

case 4:

if(ayodunquest >= 2)

{

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "ayo_fild02",280,149;

end;

}

else goto NoQuest;

case 5:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "izlu2dun",106,88;

end;

case 6:

warp "c_tower1",199,162;

end;

case 7:

if (Zeny < 5000) goto NoZenys;

Set Zeny,zeny-5000;

warp "mjolnir_02",81,359;

end;

case 8:

if(MISC_QUEST & 8)

{

if (Zeny < 5000) goto NoZenys;

Set Zeny,zeny-5000;

warp "ama_dun01",229,12;

end;

}

else goto NoQuest;

case 9:

if(aru_monas >= 18)

{

if (Zeny < 40000) goto NoZenys;

Set Zeny,zeny-40000;

warp "nameless_n",163,184;

end;

}

else goto NoQuest;

case 10:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "einbech",135,249;

end;

case 11:

warp "gef_dun00",104,99;

end;

case 12:

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "glast_01",368,303;

end;

case 13:

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "ra_fild01",233,327;

end;

case 14:

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "juperos_01",52,244;

end;

case 15:

if(KielHyreQuest >= 38)

{

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "kh_dun01",4,226;

end;

}

else goto NoQuest;

case 16:

warp "gonryun",160,195;

end;

case 17:

warp "lou_dun01",217,196;

end;

case 18:

if(MISC_QUEST & 512)

{

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "lhz_dun01",150,286;

end;

}

else goto NoQuest;

case 19:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "yuno_fild03",39,140;

end;

case 20:

if(mos_whale_edq >= 38)

{

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "mosc_dun01",189,47;

end;

}

else goto NoQuest;

case 21:

if (Zeny < 50000) goto NoZenys;

Set Zeny,zeny-50000;

warp "nyd_dun01",186,241;

end;

case 22:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-50000;

warp "odin_temp01",96,146;

end;

case 23:

warp "gef_fild10",70,332;

end;

case 24:

warp "pay_arche",43,132;

end;

case 25:

warp "cmd_fild07",97,136;

end;

case 26:

warp "moc_ruins",62,162;

end;

case 27:

if(MISC_QUEST & 8192)

{

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "ra_san01",139,134;

end;

}

else goto NoQuest;

case 28:

warp "moc_fild19",107,100;

end;

case 29:

warp "alb2trea",75,98;

end;

case 30:

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "tha_t01",149,38;

end;

case 31:

if (Zeny < 30000) goto NoZenys;

Set Zeny,zeny-30000;

warp "ve_fild03",168,235;

end;

case 32:

warp "xmas_dun01",206,18;

end;

case 33:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

warp "tur_dun01",149,238;

end;

}

}

Case 4:

mes "[Kafra Service]";

if(BaseClass != Job_Merchant && BaseClass != Job_SuperNovice){

mes "You can't rent pushcarts with that job!";

mes "Nur Merchant-Klassen und Super Novicen können das.";

emotion e_sry;

goto Fadeout;

}

if(getskilllv(39) == 0){

mes "You don't seem to have the required skill!";

emotion e_sry;

goto Fadeout;

}

if(checkcart() == 1){

mes "You already have a pushcart!";

emotion e_sry;

goto Fadeout;

}

setcart;

mes "Here's your pushcart.";

mes "Have fun!";

goto Fadeout;

}

NoQuest:

mes "[Kafra Service]";

mes "I'm sorry, you don't seem to have the required quest completed.";

close2;

cutin "",255;

end;

NoZenys:

mes "[Kafra Service]";

mes "You don't have enough money.";

close2;

cutin "",255;

end;

Fadeout:

close2;

cutin "",255;

end;

}

umbala,131,200,4 script Niflheim Agent#01::Niflwarp 117,{ //Niflheim Warper for advanced conveniance

callfunc "F_ClearGarbage";

cutin "kafra_01",2;

mes "[Niflheim Warper]";

mes "Hey " + strcharinfo(0) + "!";

mes "I can warp you right to Niflheim!";

mes "This will cost you 20,000z.";

switch(select("Warp to Niflheim.:No thanks!")){

Case 1:

if (Zeny < 20000) goto NoZenys;

Set Zeny,zeny-20000;

close2;

cutin "",255;

end;

Case 2:

next;

mes "[Niflheim Warper]";

mes "Come back if you change your mind.";

close2;

cutin "",255;

end;

}

}

// --------- NPC Clones ------------

// ---------------------------------

// ----------- Towns -------------

alberta,120,60,4 duplicate(Service) Kafra Service#02 117

aldebaran,145,118,4 duplicate(Service) Kafra Service#03 117

amatsu,100,153,5 duplicate(Service) Kafra Service#04 117

ayothaya,212,175,5 duplicate(Service) Kafra Service#05 117

cmd_fild07,89,139,5 duplicate(Service) Kafra Service#24 117

comodo,194,158,4 duplicate(Service) Kafra Service#06 117

einbroch,59,205,5 duplicate(Service) Kafra Service#07 117

einbroch,242,205,3 duplicate(Service) Kafra Service#08 117

geffen,124,68,4 duplicate(Service) Kafra Service#10 117

gonryun,157,125,5 duplicate(Service) Kafra Service#11 117

hugel,92,154,5 duplicate(Service) Kafra Service#13 117

izlude,133,117,4 duplicate(Service) Kafra Service#12 117

lighthalzen,163,102,3 duplicate(Service) Kafra Service#14 117

louyang,210,106,5 duplicate(Service) Kafra Service#15 117

morocc,156,95,5 duplicate(Service) Kafra Service#16 117

moscovia,221,195,3 duplicate(Service) Kafra Service#17 117

payon,180,104,4 duplicate(Service) Kafra Service#18 117

rachel,135,114,3 duplicate(Service) Kafra Service#19 117

umbala,92,154,5 duplicate(Service) Kafra Service#20 117

veins,211,132,5 duplicate(Service) Kafra Service#21 117

yuno,152,187,5 duplicate(Service) Kafra Service#22 117

// Extended Locations

alberta,26,240,5 duplicate(Service) Kafra Service#23 117

brasilis,197,221,4 duplicate(Service) Kafra Service#25 117

prt_fild05,290,224,3 duplicate(Service) Kafra Service#26 117

mjolnir_02,83,362,4 duplicate(Service) Kafra Service#27 117

moc_ruins,59,157,5 duplicate(Service) Kafra Service#28 117

gef_fild10,73,340,5 duplicate(Service) Kafra Service#29 117

geffen,203,123,2 duplicate(Service) Kafra Service#30 117

morocc,166,261,3 duplicate(Service) Kafra Service#31 117

lighthalzen,191,320,5 duplicate(Service) Kafra Service#32 117

lhz_in02,237,284,4 duplicate(Service) Kafra Service#33 117

niflheim,202,180,3 duplicate(Service) Kafra Service#34 117

payon,175,226,4 duplicate(Service) Kafra Service#35 117

pay_arche,58,126,3 duplicate(Service) Kafra Service#36 117

prontera,282,200,2 duplicate(Service) Kafra Service#37 117

prontera,29,207,6 duplicate(Service) Kafra Service#38 117

prontera,151,29,0 duplicate(Service) Kafra Service#39 117

prontera,152,326,3 duplicate(Service) Kafra Service#40 117

yuno,152,187,4 duplicate(Service) Kafra Service#41 117

yuno,327,108,4 duplicate(Service) Kafra Service#42 117

yuno,277,221,4 duplicate(Service) Kafra Service#43 117

  • Upvote 1
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...