EOSERV Forum > EO Server Building > feeling headstrong but need help
Page: << 1 2 >>
feeling headstrong but need help
Author Message
Post #202224 feeling headstrong but need help

Main

{

questname "Dreaming"

version 1.0

}

State begin

{

desc "Talk to the king"

 

action AddNpcText(2, "Hey [name] you made it");

action AddNpcText(2, "Wheres your clothes");

action AddNpcInput(2, 1, "Huh im not sure");

rule InputNpc(1) goto getclothes

}

State getclothes

{

desc "Talk to the king"

action AddNpcText(2, "Well go talk to the Merchant Guard im sure he'll get you taken care of");

rule TalkedToNpc(2) goto merchantguard

rule IsGender(3) goto male

rule IsGender(3) goto female

}

State merchantguard

{

desc "Talk to Merchant Guard"

 

action AddNpcText(2, "Hurry back [name] need you on the frontlines");

action AddNpcText(3, "Woah there little friend, You seem to be under dressed for this event wouldnt you say hahah");

action AddNpcInput(3, 2, "The King said you could give me what i needed to end the war");

action AddNpcText(3, "Well you in luck lad i have recently acuired some very powerful items indeed i have");

rule InputNpc(2) goto male

}

State male

{

desc "Talk to Merchant Guard"

 

action AddNpcText(3, "Try these on for size tell me what you think");

action AddNpcInput(3, 3,"Yea these are awesome");

action GiveItem(327, 1);

action GiveItem(490, 1);

action GiveItem(492, 1);

action GiveItem(485, 1);

action GiveItem(387, 1);

action GiveItem(486, 1);

action GiveItem(493, 1);

action GiveItem(408, 1);

action GiveItem(494, 1);

action GiveItem(489, 2);

action GiveItem(491, 2);

action GiveItem(488, 2);

rule InputNpc(3) goto female

}

State female

{

action GiveItem(366, 1);

action GiveItem(490, 1);

action GiveItem(492, 1);

action GiveItem(485, 1);

action GiveItem(388, 1);

action GiveItem(486, 1);

action GiveItem(493, 1);

action GiveItem(408, 1);

action GiveItem(494, 1);

action GiveItem(489, 2);

action GiveItem(491, 2);

action GiveItem(488, 2);

rule TalkedToNpc(3) goto talktoking

}

State talktoking

{

desc "Talk to the King"

 

action End();

}

Ok after reading over guide I got my first quest to work yes lol. so now I'm tackling second quest again but need help surprisly ive got it to work bouncing off one npc to anther my problem is how do I specifiy gender with items. no matter if male or female its giving me male items then when I click on addnpcinput yea these are awesome its giving me female items to


7 years, 10 weeks ago
Post #202226 Re: feeling headstrong but need help

I believe female is 0 and male is 1.

---
Want to learn to pixel?
Pixelsource.org
7 years, 10 weeks ago
Post #202228 Re: feeling headstrong but need help
Cirras posted: (24th Jan 2017, 04:34 am)

I believe female is 0 and male is 1.


Easy way to remember this is that females are nothing and males are #1
---
"Nurd, you're like a fucking swiss army knife" - Necrosis
7 years, 10 weeks ago
Post #202229 Re: feeling headstrong but need help

lol thanks

7 years, 10 weeks ago
Post #202230 Re: feeling headstrong but need help

You could always add an If / Else for "IsGender(id) goto State" in the beginning state, creating seperate dialogue and actions etc automatically based on their gender, this way they won't have to say "Hey, I'm a female!" etc.


Something like:

Main

{

questname "Dreaming"

version 1.0

}

State begin

{

desc "Talk to the king"

if IsGender(0) goto Female

else  IsGender(1) goto Male

}

State Female

{

}

State Male

{

}

---
Host of a blacklisted server...
7 years, 10 weeks ago
Post #202233 Re: feeling headstrong but need help

k I'm gonna try that thanks this quest is hard to write but really important to me if I can  get it to execute properly that would be awesome

alright that worked sweeet thanks S.O.B now to finish the quest



Main


{


questname "Dreaming"


version 1.0



}


State begin



{


desc "Talk to the king"



 


action AddNpcText(2, "Hey [name] you made it");


action AddNpcText(2, "Wheres your clothes");


action AddNpcInput(2, 1, "Huh im not sure");


rule InputNpc(1) goto getclothes



}


State getclothes



{


desc "Talk to the king"




action AddNpcText(2, "Well go talk to the Merchant Guard im sure he'll get you taken care of");


rule TalkedToNpc(2) goto merchantguard



}


State merchantguard



{


desc "Talk to Merchant Guard"



 


action AddNpcText(2, "Hurry back [name] need you on the frontlines");


action AddNpcText(3, "Woah there little friend, You seem to be under dressed for this event wouldnt you say hahah");


action AddNpcInput(3, 2, "The King said you could give me what i needed to end the war");


action AddNpcText(3, "Well you in luck lad i have recently acuired some very powerful items indeed i have");


rule InputNpc(2) goto talkwithmerchant



}


State talkwithmerchant



{


desc "Talk to Merchant Guard"



 


action AddNpcText(3, "Try these on for size tell me what you think");


action AddNpcInput(3, 3,"Yea these are awesome");


if IsGender(1) goto male


if IsGender(0) goto female



}


State male



{


action GiveItem(327, 1);


action GiveItem(490, 1);


action GiveItem(492, 1);


action GiveItem(485, 1);


action GiveItem(387, 1);


action GiveItem(486, 1);


action GiveItem(493, 1);


action GiveItem(408, 1);


action GiveItem(494, 1);


action GiveItem(489, 2);


action GiveItem(491, 2);


action GiveItem(488, 2);


if IsGender(0) goto female



}


State female



{


action GiveItem(366, 1);


action GiveItem(490, 1);


action GiveItem(492, 1);


action GiveItem(485, 1);


action GiveItem(388, 1);


action GiveItem(486, 1);


action GiveItem(493, 1);


action GiveItem(408, 1);


action GiveItem(494, 1);


action GiveItem(489, 2);


action GiveItem(491, 2);


action GiveItem(488, 2);


rule IsQuestState(2, "talkwithmerchant") goto talktoking



}


State talktoking



{


desc "Talk to the King"


action AddNpcText(2, "Now thats more like it you ready to join the front lines");


action AddNpcInput(2, 1, "Ive never felt more ready in my life");


action AddNpcInput(2, 2, "Maybe just a few more minutes");


action AddNpcText(2, "Alright now, There army is vast we have to get through the Army of Darkness ");


action AddNpcText(2, "Once thats accomplished he has two pet's of darkness ");


action AddNpcText(2, "Once those are takin care of we can launch a full assault to the Prince");


rule InputNpc(1) goto Clearapath



}


State Clearapath



{


desc "Clear a Path"



 


action AddNpcText(2, "Now clear us a path bring down 150 army of darkness");


action ShowHint("You've Clear A Path");


action PlayEffect(6);


rule KilledNpcs(135, 150) goto king



}


State king



{


desc "Talk to King"



 


action AddNpcText(2, "Impressive [name] glad to have someone so powerful on ourside we might just stand a chance");


action AddNpcText(2, "Now then, We need those pets taken care of there slaughtering our army ");


action AddNpcInput(2, 3, "Thoses creatures are vicious");


action AddNpcText(2, "CUT!! them both down in there tracks");


action PlaySound(14);


rule InputNpc(3) goto cutthemdown



}


State cutthemdown



{


desc "Slay the 2 Pets"



 


action AddNpcText(2, "You can do it save your brothers");


action ShowHint("You have slain both Pets");


action PlayEffect(7);


rule KilledNpcs(185, 2) goto king1



}


State king1



{


desc "Regroup"



 


action AddNpcText(2, "Great job [name] now for the Prince, For Seleant CHARGE!!!!!");


action AddNpcInput(2, 1, "FOR SELEANT!!!!! AHHHHHHHHHH");


action PlaySound(30);


rule InputNpc(1) goto slaytheprince



}


State slaytheprince



{


desc "Charge the Prince"



 


action AddNpcText(2, "May god be with you [name]");


action PlayEffect(21);


rule KilledNpcs(207, 1) goto king2



}


State king2



{


desc "Victory"



 


action AddNpcText(2, "[name] has killed the prince");


action AddNpcText(2, "All hail [name] hip hip hooray hip hip hooray");


action AddNpcText(2, "[name] The kingdom is forever in your debt");




action AddNpcText(2, "now wake up");


action AddNpcInput(2, 1, "Huh what you say ");


action AddNpcText(2, "Wake up");


action SpawnNPC(209, 5);


action SpawnNPC(257, 2);


action SpawnNPC(140, 3);


action PlayEffect(25);


rule InputNpc(1) goto end



}


State end



{


desc "Wake up"



 


action RemoveItem(366, 1);


action RemoveItem(327, 1);


action End();



}


k quests is working theres no errors but after I get the items its not goin to the next state I used TalkToNpc rule first an that didn't work any ideas on what rule

7 years, 10 weeks ago
Post #202240 Re: feeling headstrong but need help

When you want to move a quest state when no criteria needs to be met simply use rule Always().

7 years, 10 weeks ago
Post #202242 Re: feeling headstrong but need help

After I click yes sir in state king2 it crashing cant see problem an can anyone tell me if IsWearing is right I also had IsWearing 15 spreprate times and stil didn't work I only changed it like I have in now because I didn't know what to do with all the gotos lol I'm so close to getting it to work

State king2

{

desc "(Victory) Talk to King"

 

action PlayEffect(4);

action AddNpcText(2, "[name] has killed the prince");

action AddNpcText(2, "All hail [name] hip hip hooray hip hip hooray");

action AddNpcText(2, "[name] The kingdom is forever in your debt");

action AddNpcText(2, "Now go to the merchant an return thoses borrowed items you noble hero");

action AddNpcText(2,"Now take off your items");

action AddNpcInput(2, 2, "Yes Sir");

if IsWearing(494,490,492,485,387,388,486,493,408, 327,366,489,491,488) gotoend

rule InputNpc(2) goto giveitems

}

State giveitems

{

desc "Give Items back to Merchant"

 

action AddNpcText(2, "Hey [name] well done");

action AddNpcText(3, "Hey that Gear worked wonders out there didnt it ");

action AddNpcInput(3, 1, " They really did thanks here you go");

if IsGender(1) goto male1

if IsGender(0) goto female1

}

State male1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(387, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(327, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

rule Always() goto female1

}

State female1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(388, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(366, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

rule Always() goto end

}

State end

{

desc "Wake Up"

 

action AddNpcText(3, "Thanks [name] you are an honorable warrior");

action AddNpcText(3, "Now wake up");

action AddNpcText(3, " wake up");

action AddNpcInput(3, 1, "Huh what you say");

action AddNpcText(3, "Wakeup");

action SetCoord(9,1,2);

action End();


7 years, 10 weeks ago
Post #202250 Re: feeling headstrong but need help
Plako posted: (24th Jan 2017, 10:03 pm)

After I click yes sir in state king2 it crashing cant see problem an can anyone tell me if IsWearing is right I also had IsWearing 15 spreprate times and stil didn't work I only changed it like I have in now because I didn't know what to do with all the gotos lol I'm so close to getting it to work

State king2

{

desc "(Victory) Talk to King"

 

action PlayEffect(4);

action AddNpcText(2, "[name] has killed the prince");

action AddNpcText(2, "All hail [name] hip hip hooray hip hip hooray");

action AddNpcText(2, "[name] The kingdom is forever in your debt");

action AddNpcText(2, "Now go to the merchant an return thoses borrowed items you noble hero");

action AddNpcText(2,"Now take off your items");

action AddNpcInput(2, 2, "Yes Sir");

if IsWearing(494,490,492,485,387,388,486,493,408, 327,366,489,491,488) gotoend

rule InputNpc(2) goto giveitems

}

State giveitems

{

desc "Give Items back to Merchant"

 

action AddNpcText(2, "Hey [name] well done");

action AddNpcText(3, "Hey that Gear worked wonders out there didnt it ");

action AddNpcInput(3, 1, " They really did thanks here you go");

if IsGender(1) goto male1

if IsGender(0) goto female1

}

State male1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(387, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(327, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

rule Always() goto female1

}

State female1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(388, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(366, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

rule Always() goto end

}

State end

{

desc "Wake Up"

 

action AddNpcText(3, "Thanks [name] you are an honorable warrior");

action AddNpcText(3, "Now wake up");

action AddNpcText(3, " wake up");

action AddNpcInput(3, 1, "Huh what you say");

action AddNpcText(3, "Wakeup");

action SetCoord(9,1,2);

action End();



I'm not 100% sure, but I believe that IsWearing is only supposed to have one item id in it. I haven't written quests in a while, but i don't think you need the if statement in there. It should just be rule IsWearing(itemid) goto (state)
---
stay tuned.
7 years, 10 weeks ago
Post #202251 Re: feeling headstrong but need help

There's a space in the IsWarning statement, not sure if thats an issue or not.

408, 327,

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
7 years, 10 weeks ago
Post #202254 Re: feeling headstrong but need help

if IsWearing(494,490,492,485,387,388,486,493,408, 327,366,489,491,488) gotoend

Put a space between "goto" and "end". 

If it's still not working, try Andrew's idea, and make IsWearing a rule. You'll need to list them, however. Like this:

rule IsWearing(494) goto end
rule IsWearing(490) goto end
rule IsWearing(492) goto end
rule IsWearing(485) goto end
rule IsWearing(487) goto end

Etc.

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
7 years, 10 weeks ago
Post #202255 Re: feeling headstrong but need help

If you post your entire quest so far, or a link to it, I will see what I can do to make it work without issues for you.

---
Host of a blacklisted server...
7 years, 10 weeks ago
Post #202256 Re: feeling headstrong but need help
Nurd posted: (26th Jan 2017, 02:14 pm)

if IsWearing(494,490,492,485,387,388,486,493,408, 327,366,489,491,488) gotoend

Put a space between "goto" and "end". 

If it's still not working, try Andrew's idea, and make IsWearing a rule. You'll need to list them, however. Like this:

rule IsWearing(494) goto end
rule IsWearing(490) goto end
rule IsWearing(492) goto end
rule IsWearing(485) goto end
rule IsWearing(487) goto end

Etc.


Would doing it like work? Wouldn't it just check the first one and then skip to the next state? if that is the case, you'd have to do them one check at a time and link them.. ex:


if(iswearing(hat) goto armourcheck

else goto notwearing

if(iswearing(armour) goto shieldcheck

else goto notwearing  etc, etc until the boots check then it'd goto wearingall()

7 years, 10 weeks ago
Post #202257 Re: feeling headstrong but need help

well now the quest isn't goin to state talkwithmerchant an its giving both items to character which is weird cause I haven't touched anything up there since I got it working the first time


Main

{

questname "Dreaming"

version 1.0

}

State begin

{

desc "Talk to the king"

 

action AddNpcText(2, "Hey [name] you made it");

action AddNpcText(2, "Wheres your clothes");

action AddNpcInput(2, 1, "Huh im not sure");

rule InputNpc(1) goto getclothes

}

State getclothes

{

desc "Talk to the king"

action AddNpcText(2, "Well go talk to the Merchant Guard im sure he'll get you taken care of");

rule TalkedToNpc(2) goto merchantguard

}

State merchantguard

{

desc "Talk to Merchant Guard"

 

action AddNpcText(2, "Hurry back [name] need you on the frontlines");

action AddNpcText(3, "Woah there little friend, You seem to be under dressed for this event wouldnt you say hahah");

action AddNpcText(3, "Well you in luck lad i have recently acuired some very powerful items indeed i have");

rule TalkedToNpc(3) goto talkwithmerchant

}

State talkwithmerchant

{

desc "Talk to Merchant Guard"

 

action AddNpcText(3, "Try these on for size tell me what you think");

action AddNpcInput(3, 3,"Yea these are awesome");

if IsGender(1) goto male

if IsGender(0) goto female

}

State male

{

action GiveItem(327, 1);

action GiveItem(490, 1);

action GiveItem(492, 1);

action GiveItem(485, 1);

action GiveItem(387, 1);

action GiveItem(486, 1);

action GiveItem(493, 1);

action GiveItem(408, 1);

action GiveItem(494, 1);

action GiveItem(489, 2);

action GiveItem(491, 2);

action GiveItem(488, 2);

rule Always() goto female

}

State female

{

action GiveItem(366, 1);

action GiveItem(490, 1);

action GiveItem(492, 1);

action GiveItem(485, 1);

action GiveItem(388, 1);

action GiveItem(486, 1);

action GiveItem(493, 1);

action GiveItem(408, 1);

action GiveItem(494, 1);

action GiveItem(489, 2);

action GiveItem(491, 2);

action GiveItem(488, 2)

rule Always() goto talktoking

}

State talktoking

{

desc "Talk to the King"

action AddNpcText(2, "Now thats more like it you ready to join the front lines");

action AddNpcInput(2, 1, "Ive never felt more ready in my life");

action AddNpcInput(2, 2, "Maybe just a few more minutes");

action AddNpcText(2, "Alright now, There army is vast we have to get through the Army of Darkness ");

action AddNpcText(2, "Once thats accomplished he has two pet's of darkness ");

action AddNpcText(2, "Once those are takin care of we can launch a full assault to the Prince");

rule InputNpc(1) goto Clearapath

}

State Clearapath

{

desc "Clear a Path"

 

action AddNpcText(2, "Now clear us a path bring down 150 army of darkness");

action ShowHint("You've Clear A Path");

rule KilledNpcs(135, 15) goto king

}

State king

{

desc "Talk to King"

 

action PlayEffect(4);

action AddNpcText(2, "Impressive [name] glad to have someone so powerful on ourside we might just stand a chance");

action AddNpcText(2, "Now then, We need those pets taken care of there slaughtering our army ");

action AddNpcInput(2, 3, "Thoses creatures are vicious");

action AddNpcText(2, "CUT!! them both down in there tracks");

rule InputNpc(3) goto cutthemdown

}

State cutthemdown

{

desc "Slay the 2 Pets"

 

action AddNpcText(2, "You can do it save your brothers");

action ShowHint("You have slain both Pets");

rule KilledNpcs(185, 2) goto king1

}

State king1

{

desc "Regroup"

 

action PlayEffect(4);

action AddNpcText(2, "Great job [name] now for the Prince, For Seleant CHARGE!!!!!");

action AddNpcInput(2, 1, "FOR SELEANT!!!!! AHHHHHHHHHH");

action PlaySound(30);

rule InputNpc(1) goto slaytheprince

}

State slaytheprince

{

desc "Charge the Prince"

 

action AddNpcText(2, "May god be with you [name]");

rule KilledNpcs(207, 1) goto king2

}

State king2

{

desc "(Victory) Talk to King"

 

action PlayEffect(4);

action AddNpcText(2, "[name] has killed the prince");

action AddNpcText(2, "All hail [name] hip hip hooray hip hip hooray");

action AddNpcText(2, "[name] The kingdom is forever in your debt");

action AddNpcText(2, "Now go to the merchant an return thoses borrowed items you noble hero");

action AddNpcText(2,"Now take off your items");

action AddNpcInput(2, 2, "Yes Sir");

rule TalkedToNpc(2) goto end

if IsGender(1) goto male1

if IsGender(0) goto female1

}

State male1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(387, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(327, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

}

State female1

{

action RemoveItem(494, 1);

action RemoveItem(490, 1);

action RemoveItem(492, 1);

action RemoveItem(485, 1);

action RemoveItem(388, 1);

action RemoveItem(486, 1);

action RemoveItem(493, 1);

action RemoveItem(408, 1);

action RemoveItem(366, 1);

action RemoveItem(489, 2);

action RemoveItem(491, 2);

action RemoveItem(488, 2);

rule Always() goto end

}

State end

{

desc "Wake Up"

 

action AddNpcText(3, "Thanks [name] you are an honorable warrior");

action AddNpcText(3, "Now wake up");

action AddNpcText(3, " wake up");

action AddNpcInput(3, 1, "Huh what you say");

action AddNpcText(3, "Wakeup");

action SetCoord(9,1,2);

action End();

}


7 years, 10 weeks ago
Post #202258 Re: feeling headstrong but need help

Try changing the TalkedToNPC to an NpcInput & AddNpcInput. I tend to have issues with TalkedToNPC and changing it to that usually works for me.

callum posted: (26th Jan 2017, 05:35 pm)

Nurd posted: (26th Jan 2017, 02:14 pm)

if IsWearing(494,490,492,485,387,388,486,493,408, 327,366,489,491,488) gotoend

Put a space between "goto" and "end". 

If it's still not working, try Andrew's idea, and make IsWearing a rule. You'll need to list them, however. Like this:

rule IsWearing(494) goto end
rule IsWearing(490) goto end
rule IsWearing(492) goto end
rule IsWearing(485) goto end
rule IsWearing(487) goto end

Etc.


Would doing it like work? Wouldn't it just check the first one and then skip to the next state? if that is the case, you'd have to do them one check at a time and link them.. ex:


if(iswearing(hat) goto armourcheck

else goto notwearing

if(iswearing(armour) goto shieldcheck

else goto notwearing  etc, etc until the boots check then it'd goto wearingall()

I never thought about it that way, I always figured that would only happen if you put a ; at the end of it. It's been a while since I've written any quests or done any script-writing.

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
7 years, 10 weeks ago
Page: << 1 2 >>

EOSERV Forum > EO Server Building > feeling headstrong but need help