Resource icon

Professional Adventurer 2018-09-23

Author
nblades
Downloads
55
Views
2,716
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion

More resources from nblades

Another demonstrative way of using xmlspawner (of course working). Application: as a kind of quest, possible to expand (eg as an arena with appearing monsters)

Code:
<?xml version="1.0" standalone="yes"?>
<XmlQuestNPC>
  <NPC>
    <Name>Ward</Name>
    <Running>True</Running>
    <ProximityRange>5</ProximityRange>
    <ResetRange>16</ResetRange>
    <NoTriggerOnCarried>{GETONTRIGMOB,name}, professional adventurer</NoTriggerOnCarried>
    <AllowGhost>False</AllowGhost>
    <SpeechPace>10</SpeechPace>
    <ResetTime>1</ResetTime>
    <ConfigFile>ProfAdv</ConfigFile>
    <SpeechEntries>7</SpeechEntries>
  </NPC>
  <SpeechEntry>
    <EntryNumber>10</EntryNumber>
    <ID>10</ID>
    <Text>Welcome. If You need something to work, say: Any work?</Text>
    <DependsOn>-1</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>20</EntryNumber>
    <ID>20</ID>
    <Text>Ok lets test Your skills brave Hero. Troll or Imp?</Text>
    <Keywords>Any work?</Keywords>
    <DependsOn>10</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>30</EntryNumber>
    <ID>30</ID>
    <Keywords>Troll</Keywords>
    <Action>Troll/name/Test/ATTACH/&lt;xmldeathaction/action/@GUMP,Troll is dead,0/Say : Done!!!/</Action>
    <DependsOn>20</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>40</EntryNumber>
    <ID>40</ID>
    <Keywords>Imp</Keywords>
    <Action>Imp/name/Test/ATTACH/&lt;xmldeathaction/action/@GUMP,IMP is dead,0/Say : done!!!</Action>
    <DependsOn>20</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>50</EntryNumber>
    <ID>50</ID>
    <Text>This is professional adventurer ring!!</Text>
    <Keywords>Done!!!</Keywords>
    <Action>SETONTRIGMOB/ADD/&lt;goldring/name/{GETONTRIGMOB,name}, professional adventurer&gt;</Action>
    <DependsOn>30,40</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>60</EntryNumber>
    <ID>60</ID>
    <Text>Brave hero!</Text>
    <Action>BCAST/New professional adventurer {GETONTRIGMOB,name} reached a new level</Action>
    <DependsOn>50</DependsOn>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
  <SpeechEntry>
    <EntryNumber>0</EntryNumber>
    <ID>0</ID>
    <Pause>1</Pause>
    <PrePause>-1</PrePause>
    <LockConversation>True</LockConversation>
    <IgnoreCarried>False</IgnoreCarried>
    <AllowNPCTrigger>False</AllowNPCTrigger>
    <SpeechStyle>Regular</SpeechStyle>
    <SpeechHue>-1</SpeechHue>
  </SpeechEntry>
</XmlQuestNPC>

Then use xmledit
We can use my ProfAdv.xml as an example or create my own ProfAdv.npc for other npc

NotTrigOnCarried is crucial for a one-time quest execution. After completing the quest, the player picks up the ring with his name. Wherever he is at the player will not repeat the quest. If he throws it away - he can try again.

Entry#10 (depends on -1)
DependsOn -1
means start with no parameters except Trig and NoTrigOnCarried

Text: Welcome. If You need something to work, say: Any work?

Entry #20
The DependsOn option shows where we check (Entries number)

Keywords: Any work?
Text: Ok lets test Your skills brave Hero. Troll or Imp?

Entry #30
DependsOn 20

Keywords: Troll
Action: Troll/name/Test/ATTACH/<xmldeathaction/action/@GUMP,Troll is dead,0/Say : Done!!!

Entry #40
DependsOn 20

Keywords: Imp
Action:Imp/name/Test/ATTACH/<xmldeathaction/action/@GUMP,IMP is dead,0/Say: Done!!!

Entry #50
DependsOn 30,40

Keywords: Done!!!
Text: This is professional adventurer ring!!!
Action: SETONTRIGMOB/ADD/<goldring/name/{GETONTRIGMOB,name}, professional adventurer>

Entry #60
DependsOn 50

Text: Brave hero!

Action: BCAST/New professional adventurer {GETONTRIGMOB,name} reached a new level

Of course, you can not underestimate the players. In this working example it is possible to bypass certain requirements (specially, because it is needed for other ideas based on the quest). If we want the player to perform tests honestly - we have to check it (eg by adding ATTACH after killing the monster) - in my quest it is missing.


In order to run the quest dialog prepared by us, we place it in the xmlspawner, in xmlquestnpc the following entries

xmlquestnpc/title/ - adventure professor/blessed/true/configfile/ProfAdv/loadconfig/true
  • ProfessionalAdventurer.png
    ProfessionalAdventurer.png
    207 KB · Views: 274

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back