Jump to content
Sign in to follow this  
emotivated

Small beginner quest script

Recommended Posts

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;        close;}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 emotivated

Share this post


Link to post
Share on other sites

Works great, I only see 1 small issue:

 

case 2:

cutin "",255;

break;

 

if it has break; at the end it makes the npc bug.

 

if you replace it with close;

 

it works perfectly fine ;)

My bad, thanks for the correction sir.

 

I wrote it while having my server running rAthena emulator, but I've grown to like Hercules more and I got a lot more to learn. :)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.