Jump to content

Small beginner quest script


Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   2
  • Joined:  09/03/15
  • Last Seen:  

Hello everyone, 

 

I'd like to contribute with my first made script, it's by no means perfect and I know there's flaws. But it's a good base for any starters that'd like to continue off on it. Basically, it's placed at @go 15 and when you begin you kill specified monsters to get rewarded by the novice girl NPC. It gives you a selection of common pet eggs and some small amount of EXP, then lastly warps and sets your savepoint in Prontera. Anyway, here's the script. Feel free to criticize and modify it as you see fit, thank you!

//===== By: ==================================================
//= emotivated
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= A simple quest script suitable for fresh novices.
//= It asks you to kill specified monsters for rewards.
//= When completed, it warps you to Prontera and saves there.
//============================================================

new_1-1,57,118,4    script    Novice    639,{

if(class != Job_Novice) goto l_nomore;
if(BaseLevel >= 25) goto l_nomore;
if(PoringKills && LunaticKills >= 3) goto l_finished;
if(PoringKills && LunaticKills < 3) goto l_nokills;

l_nokills:
cutin "nov_lumin02",2;
mes "[Novice]";
mes "Please help me!";
mes " ";
mes "Can you get rid of some..";
mes ".. Lunatic & Porings for me?";
dispbottom "[ You have killed "+LunaticKills+"/3 Lunatic & "+PoringKills+"/3 Porings ]";
close2;
cutin "",255;
end;

l_finished:
setarray .@x[0],9001,9005,9004,9006,9010,9041;
set .@i, rand(getarraysize(.@x));
getitem .@x[.@i],1;
getitem 7539,2;
getitem 13995,1;
getexp 1000,700;
showevent -1;
emotion e_no1, 0;
cutin "nov_lumin03",2;
mes "[Novice]";
mes "Wow! Thank you so much <3";
mes "";
PoringKills = 0;
LunaticKills = 0;
mes "Should I take you to Prontera?";
next;
cutin "nov_lumin05",2;
switch(select("Yes please!:No thanks..:")) {
    case 1:
        savepoint "prontera",157,175;
        warp "prontera.gat",155,183;

    case 2:
        cutin "",255;
        break;
}
end;

l_nomore:
if(delay <= gettimetick(2)){
set delay,gettimetick(2)+10;
emotion e_sry, 0;
npctalk "Sorry, I don't need anymore help.";
end;
}
end;

OnNPCKillEvent:
if(killedrid == 1002 && PoringKills < 3) {
set PoringKills,PoringKills + 1;
dispbottom "[ You have killed "+LunaticKills+"/3 Lunatic & "+PoringKills+"/3 Porings ]";

}else if (killedrid == 1063 && LunaticKills < 3) {
set LunaticKills,LunaticKills + 1;
dispbottom "[ You have killed "+LunaticKills+"/3 Lunatic & "+PoringKills+"/3 Porings ]";
}

OnPCLoadMapEvent:
if(Baselevel >= 25) {
showevent -1;
} else {
showevent 1,0;
end;
}
end;

}
new_1-1    mapflag    loadevent
Edited by Emistry
Codebox.
Link to comment
Share on other sites


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

Please follow the Script Release Rules and Regulations. Please update your topic.
 

 

Beside ... 

set PoringKills,PoringKills == 0;
set LunaticKills,LunaticKills == 0;

 I believe should be

PoringKills = 0;
LunaticKills = 0;

If you just planning to give some monster hunting quests, it's better to use the db/quest_db.txt it's more efficient and easier to control.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   2
  • Joined:  09/03/15
  • Last Seen:  

Thank you Emistry, updated it now. I'll look into your advice!

Edited by emotivated
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

Showevent does not work :) also, it would be great 1 quest at a time.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   2
  • Joined:  09/03/15
  • Last Seen:  

Showevent does not work :) also, it would be great 1 quest at a time.

hi :) it's only showing event if you're 25 or less leve, good idea. i'll improve it these coming days

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/27/15
  • Last Seen:  

I got some error please help

151004065358.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  08/13/14
  • Last Seen:  

I got some error please help

151004065358.jpg

check the spaces and tabs 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/27/15
  • Last Seen:  

Worked Thank.

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
Reply to this topic...

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