question

Post your quests here!
squirtle
Member
Member
Posts: 41
Joined: Tue Nov 18, 2014 3:28 pm
Location: North Carolina
Contact:

question

Postby squirtle » Thu Dec 11, 2014 8:36 am

can anyone tell me whats wrong with this quest? the error log says
> Syntax Error: State 'removereddye' already exists (Line 77)

Main
{
questname "Hairdye Quest"
version 1.0
}
state Begin
{
desc "Talk to Bob"
action AddNpcText(1, "Hello there, would you help me gather hair supplies? I'm running low on them.");
action AddNpcInput(1, 1, "Sure, I'll help you.");
action AddNpcInput(1, 2, "No thanks, I'm busy.");
rule InputNpc(1) goto Continue
rule InputNpc(2) goto BeforeReset
}
state BeforeReset
{
desc "Talk to Bob"
action AddNpcText(1, "That is okay, come back any time you'd like.");
rule TalkedToNpc(1) goto EndReset
}
state EndReset
{
action Reset();
}

state Continue
{
desc "Talk to Bob"
action AddNpcText(1, "That is great! I'm so glad you're willing to help.");
rule TalkedToNpc(1) goto RedDye
}
state RedDye
{
desc "Get 50 Red Hair Dyes"
action AddNpcText(1, "I'm going to need 50 Red Hair Dyes. Return to me when you have them.");
action AddNpcInput(1, 1, "I'm working on it.");
action AddNpcInput(1, 2, "I'm sorry, I won't be able to do that.");
rule GotItems(218, 50) goto ReturnRedDye
rule InputNpc(2) goto BeforeReset
}
state ReturnRedDye
{
desc "Return to Bob"
action ShowHint("You have all 50 Red Hair Dyes! Return to Bob.");
action AddNpcText(1, "You have all 50 Red Hair Dyes? That is good, now I need you to get some more.");
rule TalkedToNpc(1) goto RemoveRedDye
rule LostItems(218, 50) goto RedDye
}
state RemoveRedDye
{
action RemoveItem(218,50);
action ShowHint("You give 50 Red Hair Dyes to Bob.");
rule Always() goto PurpleDye
}
state PurpleDye
{
desc "Get 50 Purple Hair Dyes"
action AddNpcText(1, "I'm going to need 50 Red Hair Dyes. Return to me when you have them.");
action AddNpcInput(1, 1, "I'm working on it.");
action AddNpcInput(1, 2, "I'm sorry, I won't be able to do that.");
rule GotItems(215, 50) goto ReturnPurpleDye
rule InputNpc(2) goto BeforeReset
}
state ReturnPurpleDye
{
desc "Return to Bob"
action ShowHint("You have all 50 Purple Hair Dyes! Return to Bob.");
action AddNpcText(1, "You have all 50 Purple Hair Dyes? Will you hand them over?");
rule TalkedToNpc(1) goto RemoveRedDye
rule LostItems(215, 50) goto PurpleDye
}
state RemoveRedDye
{
action RemoveItem(215,50);
action ShowHint("You give 50 Purple Hair Dyes to Bob.");
rule Always() goto BeforeReward
}
state BeforeReward
{
desc "Talk to Bob"
action AddNpcText(1, "Thanks for all your help. Come back any time if you feel like helping again.");
rule TalkedToNpc(1) goto Reward
}
state Reward
{
action GiveEXP(1500);
action GiveItem(1, 3000);
action ShowHint("You've gained 1,500 EXP and 3,000 Gold!");
rule Always() goto EndReset
}
User avatar
04jordanjamie
Veteran
Veteran
Posts: 105
Joined: Sun Nov 30, 2014 1:56 am
Location: Wolverhampton

RE: question

Postby 04jordanjamie » Thu Dec 11, 2014 9:30 am

You have 2 states with Removereddye try renaming one of them and see if that fixes it

I updated your quest I am guessing that the second removereddye was meant to be removepurpledye just make changes to that state if I am wrong. hope this helps :)

Main
{
questname "Hairdye Quest"
version 1.0
}
state Begin
{
desc "Talk to Bob"
action AddNpcText(1, "Hello there, would you help me gather hair supplies? I'm running low on them.");
action AddNpcInput(1, 1, "Sure, I'll help you.");
action AddNpcInput(1, 2, "No thanks, I'm busy.");
rule InputNpc(1) goto Continue
rule InputNpc(2) goto BeforeReset
}
state BeforeReset
{
desc "Talk to Bob"
action AddNpcText(1, "That is okay, come back any time you'd like.");
rule TalkedToNpc(1) goto EndReset
}
state EndReset
{
action Reset();
}

state Continue
{
desc "Talk to Bob"
action AddNpcText(1, "That is great! I'm so glad you're willing to help.");
rule TalkedToNpc(1) goto RedDye
}
state RedDye
{
desc "Get 50 Red Hair Dyes"
action AddNpcText(1, "I'm going to need 50 Red Hair Dyes. Return to me when you have them.");
action AddNpcInput(1, 1, "I'm working on it.");
action AddNpcInput(1, 2, "I'm sorry, I won't be able to do that.");
rule GotItems(218, 50) goto ReturnRedDye
rule InputNpc(2) goto BeforeReset
}
state ReturnRedDye
{
desc "Return to Bob"
action ShowHint("You have all 50 Red Hair Dyes! Return to Bob.");
action AddNpcText(1, "You have all 50 Red Hair Dyes? That is good, now I need you to get some more.");
rule TalkedToNpc(1) goto RemoveRedDye
rule LostItems(218, 50) goto RedDye
}
state RemoveRedDye
{
action RemoveItem(218,50);
action ShowHint("You give 50 Red Hair Dyes to Bob.");
rule Always() goto PurpleDye
}
state PurpleDye
{
desc "Get 50 Purple Hair Dyes"
action AddNpcText(1, "I'm going to need 50 Red Hair Dyes. Return to me when you have them.");
action AddNpcInput(1, 1, "I'm working on it.");
action AddNpcInput(1, 2, "I'm sorry, I won't be able to do that.");
rule GotItems(215, 50) goto ReturnPurpleDye
rule InputNpc(2) goto BeforeReset
}
state ReturnPurpleDye
{
desc "Return to Bob"
action ShowHint("You have all 50 Purple Hair Dyes! Return to Bob.");
action AddNpcText(1, "You have all 50 Purple Hair Dyes? Will you hand them over?");
rule TalkedToNpc(1) goto RemovePurpleDye
rule LostItems(215, 50) goto PurpleDye
}
state RemovePurpleDye
{
action RemoveItem(215,50);
action ShowHint("You give 50 Purple Hair Dyes to Bob.");
rule Always() goto BeforeReward
}
state BeforeReward
{
desc "Talk to Bob"
action AddNpcText(1, "Thanks for all your help. Come back any time if you feel like helping again.");
rule TalkedToNpc(1) goto Reward
}
state Reward
{
action GiveEXP(1500);
action GiveItem(1, 3000);
action ShowHint("You've gained 1,500 EXP and 3,000 Gold!");
rule Always() goto EndReset
}
Last edited by 04jordanjamie on Thu Dec 11, 2014 9:36 am, edited 1 time in total.
squirtle
Member
Member
Posts: 41
Joined: Tue Nov 18, 2014 3:28 pm
Location: North Carolina
Contact:

RE: question

Postby squirtle » Thu Dec 11, 2014 10:17 am

thanks it worked :)
User avatar
04jordanjamie
Veteran
Veteran
Posts: 105
Joined: Sun Nov 30, 2014 1:56 am
Location: Wolverhampton

RE: question

Postby 04jordanjamie » Thu Dec 11, 2014 10:18 am

Glad to hear :)

Return to “Quests”

Who is online

Users browsing this forum: No registered users and 2 guests