Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,570
- Solutions
- 6
- Reaction score
- 437
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello OTLanders!
I was testing how the original format of OpenTibia NPC which is more or less based on the original format of CipSoft NPCs, as an example I took the NPC Penny which is located on the Isle of Solitude known as GM island
I finally understood how this system works.
I'll post here the original file from CIP, with the Jiddo System and the OpenTibia System so you can see how they work ;]
Jiddo NPC System
OpenTibia System
Enjoy it ;]
I was testing how the original format of OpenTibia NPC which is more or less based on the original format of CipSoft NPCs, as an example I took the NPC Penny which is located on the Isle of Solitude known as GM island
I finally understood how this system works.
I'll post here the original file from CIP, with the Jiddo System and the OpenTibia System so you can see how they work ;]
Code:
# GIMUD - Graphical Interface Multi User Dungeon
# penny.npc: Datenbank für die GM-Gehilfin Penny
Name = "Penny"
Sex = female
Race = 1
Outfit = (137,96-79-95-96)
Home = [32315,31936,7]
Radius = 2
GoStrength = 10
Behaviour = {
ADDRESS,"hello$",male,! -> "Welcome home, Sir %N."
ADDRESS,"hi$",male,! -> *
ADDRESS,"hello$",female,! -> "Welcome home, Lady %N."
ADDRESS,"hi$",female,! -> *
ADDRESS,! -> Idle
BUSY,"hi$",male,! -> "Just a minute, Sir %N.", Queue
BUSY,"hello$",male,! -> *
BUSY,"hi$",female,! -> "Just a minute, Lady %N.", Queue
BUSY,"hello$",female,! -> *
BUSY,! -> NOP
VANISH,! -> "May Justice be with you!"
"bye" -> "May Justice be with you!", Idle
"farewell" -> *
"name" -> "I am miss Penny, your secretary."
"job" -> "I'm your secretary. I'm organizing all those criminal records and your mail."
"criminal" -> "<Sigh> It's an evil world, isn't it?"
"record" -> *
"mail" -> "You can get a letter from me."
"letter" -> "Here you are.", Create(3505)
}
Jiddo NPC System
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Penny" script="default.lua" walkinterval="1000" access="3" floorchange="0">
<health now="100" max="100"/>
<look type="137" head="96" body="79" legs="95" feet="96" addons="0"/>
<parameters>
<parameter key="message_greet" value="Welcome home, Sir |PLAYERNAME|"/>
<parameter key="message_farewell" value="May Justice be with you!."/>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="name;job;mail;criminal;" />
<parameter key="keyword_reply1" value="I am miss Penny, your secretary." />
<parameter key="keyword_reply2" value="I'm your secretary. I'm organizing all those criminal records and your mail." />
<parameter key="keyword_reply3" value="You can get a letter from me." />
<parameter key="keyword_reply4" value="It's an evil world, isn't it?" />
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="" />
<parameter key="shop_sellable" value="" />
</parameters>
</npc>
OpenTibia System
Code:
<?xml version="1.0"?>
<npc name="Penny" floorchange="0" walkinterval="1000">
<health now="150" max="150"/>
<look type="137" head="96" body="79" legs="95" feet="96"/>
<interaction range="2" idletimeout="30">
<interact keywords="hi" param="male" focus="1">
<!--Essas são palavras-chaves alternativas-->
<keywords>hello</keywords>
<response text="Welcome home, Sir |NAME|."/>
</interact>
<interact keywords="hi" param="female" focus="1">
<!--Essas são palavras-chaves alternativas-->
<keywords>hello</keywords>
<response text="Welcome home, Lady |NAME|."/>
</interact>
<interact keywords="bye" focus="0">
<!--Essas são palavras-chaves alternativas-->
<keywords>farewell</keywords>
<response text="May Justice be with you!"/>
</interact>
<interact event="onBusy" param="male">
<response text="Just a minute, Sir |NAME|.">
<action name="addqueue" value="|PLAYER|"/>
</response>
</interact>
<interact event="onBusy" param="female">
<response text="Just a minute, Lady |NAME|.">
<action name="addqueue" value="|PLAYER|"/>
</response>
</interact>
<interact event="onPlayerLeave" focus="0">
<response text="May Justice be with you!"/>
</interact>
<interact keywords="name">
<response text="I am miss Penny, your secretary."/>
</interact>
<interact keywords="job">
<response text="I'm your secretary. I'm organizing all those criminal records and your mail."/>
</interact>
<interact keywords="criminal">
<response text="It's an evil world, isn't it?"/>
</interact>
<interact keywords="record">
<response text="It's an evil world, isn't it?"/>
</interact>
<interact keywords="mail">
<response text="You can get a letter from me."/>
</interact>
<interact keywords="letter">
<response text="Here you are.">
<action name="giveitem" value="2597"/>
</response>
</interact>
</interaction>
</npc>
Enjoy it ;]