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

[HELP]Teleport NPC , Training in your own house

abreham

New Member
Joined
Aug 29, 2008
Messages
16
Reaction score
0
Got this error with my own script:

Server:
[23/09/2008 21:01:00] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/training.lua
[23/09/2008 21:01:00] data/npc/scripts/training.lua:47: '<eof>' expected near 'end'

Script:
local LEVEL = 8

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end
-- OTServ event handling functions end


function onsay(cid, frompos, topos)

player1pos = {x=33225, y=31671, z=13, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=33224, y=31671, z=13, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=33223, y=31671, z=13, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=33222, y=31671, z=13, stackpos=253}
player4 = getThingfromPos(player4pos)

nplayer1pos = {x=32218, y=31659, z=13}
nplayer2pos = {x=33221, y=31659, z=13}
nplayer3pos = {x=33220, y=31659, z=13}
nplayer4pos = {x=33219, y=31659, z=13}


if player1 and player2 and player3 and player4 then


doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)

end

MY scipt shall work like this: You take a tp inside your house up to the roof. At the roof you got 8 training monks that attacking you(good shielding) when your done you talk to a npc that telport you down. (addining a picture to help you understand). It would be very nice if someone just took time and did this.
Training.JPG
 
Back
Top