• 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!

Lua Npc ;)

Zerity

New Member
Joined
Jul 7, 2009
Messages
89
Reaction score
0
Hallo i need help with my NPC..

here is the code..
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Elina" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
    <health now="185" max="185"/>
    <look type="155" addons="3" head="39" body="20" legs="68" feet="43" corpse="2317"/>
    <parameters>
        <parameter key="module_travel" value="1"/>
        <parameter key="message_greet" value="Welcome, you can travel to Serica and Elinia with me ."/>
        <parameter key="message_farewall" value="Goodbye."/>
        <parameter key="message_walkaway" value="Your stupid little kid."/>
        <parameter key="travel_destinations" value="Serica,450,8,7,200;Elinia,123,38,7,200;"/>
    </parameters>
</npc>
I made it in a program called NPC maker V2

I can say hi , travel Serica but then nothings happens..
it dont say " Do you want to travel to Serica for 200 gold?"
so i dont get teleported to the city

and i know something is missing i can see it on the code
but im not a good scripter so i cant fix it myself :(
 
Last edited by a moderator:
Mattyboi88 can you please like type the hole thing? becuse i dont know where to put and that stuff thx :) :wub:
 
local tmp = getCreaturePosition(cid)
doTeleportThing(cid, destination)
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(destination, CONST_ME_TELEPORT)

Just a quick script put together, add that into your data/npc/scripts/default.lua file :) Rep me if i helped u
 

Similar threads

Back
Top