EOSERV Forum > EO Server Building > need some help with a quest
Page: << 1 >>
need some help with a quest
Author Message
Post #204739 need some help with a quest

Having trouble at state spawn I want it to where if you die you can restart the quest but if you kill the npcs then the quest continues but if rule always isn't on there then if you die you cant redo quest N if you kill the npc its doesn't warp you back to map 3 to continue the quest. PLease Help lol

Main

{

questname "Main Story Part 1"

version 1.0

}

State begin

{

desc "Talk to Farmer John"

action AddNpcText(7, "Hey Kiddio How you doin");

action AddNpcText(7, "Oh shoot well ill be darned looks like the pigs are having babies");

action AddNpcText(7, "will you help me get the babies i think there 10 of them");

action AddNpcInput(7, 1, "yeah sure");

action AddNpcInput(7, 2, "not today sorry");

rule InputNpc(1) goto start

}

 

State start

{

desc "Help deliver 10 baby pigs"

rule GotItems(493, 10) goto talk

}

State talk

{

desc "Kill the Darkness Slave"

action RemoveItem(493, 10);

action AddNpcText(7, "Woah that was some work thanks kid");

action AddNpcText(7, "Whats that sound");

rule TalkedToNpc(7) goto spawn

}

State spawn

{

action Quake(7);

action SetCoord(200,13,12);

rule  Always() goto talk

rule KilledNpcs(207, 3) goto return

}

State return

{

desc "Talk to Farmer John"

action SetCoord(3,13,12);

rule Always() goto talk1

}

State talk1

{

desc "Talk to Farmer John"

action AddNpcText(7, "Oh Thank god you were here or me an my family would have died");

action AddNpcText(7, "The prohecy was true the darkness has returned");

action AddNpcInput(7, 1, "The Prohecy?");

rule InputNpc(1) goto explain

}

State explain

{

desc "Talk to Farmer John"

action AddNpcText(7, "Long ago the darkness ruled these lands destroying life all around world ");

action AddNpcText(7, "All was lost until one day a hero was born,Prohecy told of a hero to slay the Darkness ");

action AddNpcText(7, "Before the Darkness dissappear an took the hero with him to the void he said he would return to destroy us once again");

action AddNpcText(7, "Hundreds of years have past we thought all was good again until one of the prophecies came to pass");

action AddNpcText(7, "Now its clear that the Darkness has returned we must send word of this to the king ");

rule TalkedToNpc(7) goto reward

}

State reward

{

desc "Talk to Farmer John"

action GiveEXP(20000);

action GiveItem(1, 500);

action GiveItem(2, 30);

action End();


11 weeks, 43 minutes ago
Post #204740 Re: need some help with a quest

I’m not amazing at quests but it looks like you have an infinite loop? As soon as you talk to the npc you progress to a state that has an always rule to push you back to the previous state?

---
https://Havenshost.net/
10 weeks, 6 days ago
Post #204741 Re: need some help with a quest

yea but if I take always out of the quest an you die then you cant complete the quest. I need it to work in the since that if you die you can proceed to redo the quest at the pervious state, and if you kill the npcs on that map you continue on to the reward.

10 weeks, 6 days ago
Post #204743 Re: need some help with a quest

Just to be honest here, this quest should not even load into EOSERV due to the recursion. Hopefully this isn’t a custom build you are using with quest errors ignored or worse yet the quest integrity check was broken completely. What you are looking for is the quest rule Die() which would have been the official notation as it was actually an unused quest rule in the official EO server. You can find this and the other remaining official quest rules that have not been implemented here https://eoserv.net/bugs/view_bug/367 . As far as a work around, try using the EnterMap or LeaveMap rules. You could even go as entering the coordinates of your spawn point. Always() is a very dangerous rule if used by someone new to writing quests. I would highly recommend of eliminating every possibility before deciding on calling that rule.

10 weeks, 6 days ago
Post #204744 Re: need some help with a quest

okay thanks ill ticker with it a bit

10 weeks, 3 days ago
Post #204760 Re: need some help with a quest

Another work-around is to have two quests.

The main logic in the first quest.

A second NPC / quest outside the quest map, that can check the player to see if they are on the suitable quest state from the first quest, if so, to warp them inside the quest map, if not, to tell them where to start the quest etc.


Edit* it seems vanilla does not have a check quest state rule...


This could be replaced I suppose, with an item.


First quest gives them a quest item they must have in their bag to return, second quest checks to see if they have that item in bag, before warping in.


Also if you do not wish for them to be able to return after completion - 

Make the item Lore. In the first quest, at the end of it, check to see if they have the item in their bag still, if they do, remove it and complete quest, if they don't (tried to bank etc), tell them to go fetch first.

8 weeks, 2 days ago
Page: << 1 >>

EOSERV Forum > EO Server Building > need some help with a quest