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

Cloow

Active Member
Joined
May 10, 2010
Messages
1,086
Reaction score
35
Alright, i made a quick script. My first one actually.

Here is my question, if i want the line
if item.itemid == 59281 then
To be UID instead of itemID what should i do?


Also, when im trying to start the server with my script i get this error
16h2sci.png
and i can't just see what i have done wrong.







PHP:
local t = 
{
      monster = "Monster"
	  pos = {x=967, y=1007, z=7},
	  msg = "Monster appears right infront of your eyes!!"
	  tpos = {x=967, y=1007, z=7},
	  cpod = {x=960, y=1007, z=7},
	  bmsg = "How dare you?!"
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
       if item.itemuid == 59281 then
         doSummonCreature(t.monster,t.pos)
		  doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
		   doCreateTeleport(1387, t.tpos, t.cpos)
		     doBroadcastMessage(t.bmsg, TALKTYPE_RED_1)
		    return TRUE
     end
end


If you see any errors, wich will not work when im testing this. I would love to know em =>

Soon enough im gonna be pro on scripting !
 
Yeah, everything works fine!

Thanks guys i'll repped all of you, will do tomorrow to.

I'll just use this thread when i need help next time :peace:
 
Back
Top