• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[problem] npc

Maxens

Member
Joined
Apr 9, 2009
Messages
479
Reaction score
7
Location
Germany
Hello everyone ;)

I made a NPC called "Casino Owner"

I will post the script here...like you will see I wanted that he says some sentences on his own but on this way i configured it it doesnt work!

Could you maybe edit my script that it works?

Thanks a lot you will get rep++ if it works :)

PHP:
<?xml version="1.0" encoding="UTF-8"?> 
<npc name="Casino Owner" walkinterval="2000" floorchange="0"> 
    <health now="100" max="100"/> 
    <look type="132" head="115" body="94" legs="0" feet="114" addons="3"/> 
    <parameters> 
    </parameters> 
	<voices interval="5000" chance="10">
		<voice sentence="Welcome to my Casino!" yell="1"/>
		<voice sentence="Maybe you are the lucky one today!" yell="1"/>
		<voice sentence="Some people get rich here!" yell="1"/>
		<voice sentence="It's me a pleasure to count your money!" />
		<voice sentence="Smoke Water-pipe and talk with friends!" yell="0"/>
	</voices>
</npc>
 
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Casino Owner" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="132" head="115" body="94" legs="0" feet="114" addons="3"/>
<parameters>
<voices interval="5000" chance="10">
<voice sentence="Welcome to my Casino!" yell="1"/>
<voice sentence="Maybe you are the lucky one today!" yell="1"/>
<voice sentence="Some people get rich here!" yell="1"/>
<voice sentence="It's me a pleasure to count your money!" />
<voice sentence="Smoke Water-pipe and talk with friends!" yell="0"/>
</voices>
</parameters>
</npc>
 
use Default.lua


<?xml version="1.0" encoding="UTF-8"?>
<npc name="Casino Owner" script="default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="132" head="115" body="94" legs="0" feet="114" addons="3"/>
<parameters>
</parameters>
<voices interval="5000" chance="10">
<voice sentence="Welcome to my Casino!" yell="1"/>
<voice sentence="Maybe you are the lucky one today!" yell="1"/>
<voice sentence="Some people get rich here!" yell="1"/>
<voice sentence="It's me a pleasure to count your money!" />
<voice sentence="Smoke Water-pipe and talk with friends!" yell="0"/>
</voices>
</npc>
 
~scratches head~ im very newbie into coding npc and such but try function onCreatureAppear(cid) and set it to yell that when he's not focused on your cid donno if you can do it like that :|
 
Srry but I'm also new xD I have no clue what u told me with function onCreatureAppear(cid)

could you make it for me and gimme the script and i'll try it?
 
Casino Owner.xml
XML:
<?xml version="1.0"?>
<npc name="Casino Owner" floorchange="0" walkinterval="2000">
	<health now="100" max="100"/>
	<look type="132" head="115" body="94" legs="0" feet="114" addons="3"/>

  <interaction range="5" idleinterval="50" defaultpublic="0">

    <interact event="onIdle">
      <response text="Welcome to my Casino!" public="1">
        <action name="idle" value="1"/>
      </response>
      <response text="Maybe you are the lucky one today!" public="1">
        <action name="idle" value="1"/>
      </response>
      <response text="Some people get rich here!" public="1">
        <action name="idle" value="1"/>
      </response>
      <response text="It's a pleasure to count your money!" public="1">
        <action name="idle" value="1"/>
      </response>
      <response text="Smoke Water-pipe and talk with friends!" public="1">
        <action name="idle" value="1"/>
      </response>

    </interact>

  </interaction>

</npc>

If the npc talks to often or not often enough, you can change the idleinterval.
 
Last edited:
Back
Top