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

Arena and Npc

kamilcioo

Veteran OT User
Joined
Jul 25, 2008
Messages
979
Solutions
1
Reaction score
291
I need script to arena and npc:

1. Person talk to npc and npc take him to place 5x5
2. Monsters apper and every killed monster will transform to next monster and when person kill all 10 monsters teleport appear for 1 minute .
 
data/npc/scripts/teleporter.lua
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)			npcHandler:onCreatureSay(cid, type, msg) end
function onThink()					npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)
if (msgcontains(msg, 'teleport')) then
   doTeleportThing(cid, {x=402, y=3169, z=7})
   end
return true
end
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

data/npc/teleporter.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Teleporter" script="data/npc/scripts/teleporter.lua" walkinterval="2500" floorchange="0">
<health now="100" max="100"/>
<look type="129" head="79" body="113" legs="105" feet="86" addons="0"/>
        <parameters>
                <parameter key="message_greet" value="Hi |PLAYERNAME|"/>
                <parameter key="message_farewell" value="Bye |PLAYERNAME"/>
 
    </parameters>
 
</npc>

Change
doTeleportThing(cid, {x=402, y=3169, z=7})
To your coordinates
 
Back
Top