Small beginner quest script

Started by emotivated, Sep 03, 2015, 09:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

emotivated

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
"Out beyond ideas of wrongdoing and rightdoing there is a field. I'll meet you there.
.. When the soul lies down in that grass the world is too full to talk about.
" -R

tokoroko

Yeah man, this looks real good. Did you put this whole thing together yourself? It seems simple enough, does it run well? Have you tested it in-game? I'm tempted to try it on a server myself to see if it's bug-free.

emotivated

yeah, i made this script. but looking back at it now, i can see a lot of ways on how to improve it. it's kinda cute and brings back memories to me from that time. i think i'll release more scripts when i'm free, for sure an update to this one.
"Out beyond ideas of wrongdoing and rightdoing there is a field. I'll meet you there.
.. When the soul lies down in that grass the world is too full to talk about.
" -R