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

Pokemon Portait System

totolol123

Well-Known Member
Joined
Oct 19, 2010
Messages
325
Reaction score
81
Hello I need a script portait.
Ex: I put an item in the slot "feet" for this item to the top slot in the "legs" was gone an item "empty portait" and appeared "portait with pokemon" to strip this item "was gone with the portait pokemon" and appeared to "empty portait" i need this script.
rep + +
Ty
 
I make for you the base, because I have free time ;) here
Lua:
function onEquip(cid, item, slot)
local img = 2121 -- itemid of portrait image on legs slot
if not getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid > 0 then
doPlayerAddItem(cid, img, 1)
else
doTransformItem(getPlayerSlotItem(cid,CONST_SLOT_LEGS).uid, img, 1)
end
return true
end



Now on movements.xml:

XML:
<movevent type="Equip" itemid="ppokeballid" slot="feet" event="script" value="name.lua"/>

Now new LUA file on movements/script and put this:
Lua:
function onDeEquip(cid, item, slot)
doRemoveItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 1)
return true
end

Now on movements.xml this:
XML:
	<movevent type="DeEquip" itemid="pokeballid" slot="feet" event="script" value="name.lua"/>

^_^
 
Last edited:
This is cool man , but only change one thing :
<movevent type="Equip" itemid="ppokeballid" slot="feet" event="function" value="name.lua"/>
for
<movevent type="Equip" itemid="ppokeballid" slot="feet" event="script" value="name.lua"/>

and the same for DeEquip. :D
 
hey guys, i've been looking and trying to test but i got this error

[02/11/2010 04:02:43] [Error - LuaScriptInterface::loadFile] data/movements/scripts/port.lua:1: unexpected symbol near 'ï'
[02/11/2010 04:02:43] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/ps1.lua)
[02/11/2010 04:02:43] data/movements/scripts/port.lua:1: unexpected symbol near 'ï'
[02/11/2010 04:02:43] [Error - LuaScriptInterface::loadFile] data/movements/scripts/por2.lua:1: unexpected symbol near 'ï'
[02/11/2010 04:02:43] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/ps2.lua)
[02/11/2010 04:02:43] data/movements/scripts/por2.lua:1: unexpected symbol near 'ï'

ps1, 1st lua code
ps2, 2nd lua code

i dont know anything bout it so, can anyone or the post guy help?

(sorry 'bout my english)
Regards
Dk
 
[02/11/2010 20:11:46] >> Loading script systems
[02/11/2010 20:11:50] [Error - LuaScriptInterface::loadFile] data/movements/scripts/ps1.lua:1: unexpected symbol near 'ï'
[02/11/2010 20:11:50] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/ps1.lua)
[02/11/2010 20:11:50] data/movements/scripts/ps1.lua:1: unexpected symbol near 'ï'
[02/11/2010 20:11:50] [Error - LuaScriptInterface::loadFile] data/movements/scripts/ps2.lua:1: unexpected symbol near 'ï'
[02/11/2010 20:11:50] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/ps2.lua)
[02/11/2010 20:11:50] data/movements/scripts/ps2.lua:1: unexpected symbol near 'ï'
[02/11/2010 20:11:50] >> Loading chat channels

@ edit

Thanks for your help.. i appreciated , i was using notepad++ to edit lua files this editor set extra control-characters in the files invisible to the eye, now i'm using luaedit to do it and that's all ok.

Now i receive a msg when try to put the item on correct slot

"You cannot dress this object there"

[05/11/2010 04:48:15] [Error - MoveEvents Interface]
[05/11/2010 04:48:15] data/movements/scripts/ps1.lua:eek:nEquip
[05/11/2010 04:48:15] Description:
[05/11/2010 04:48:15] data/movements/scripts/ps1.lua:3: attempt to compare number with boolean
[05/11/2010 04:48:15] stack traceback:
[05/11/2010 04:48:15] data/movements/scripts/ps1.lua:3: in function <data/movements/scripts/ps1.lua:1>

so where is the problem now?
 
Last edited:
[11/11/2010 14:43:12] [Error - MoveEvents Interface]
[11/11/2010 14:43:12] data/movements/scripts/portrait/abra.lua:eek:nEquip
[11/11/2010 14:43:12] Description:
[11/11/2010 14:43:12] data/movements/scripts/portrait/abra.lua:3: attempt to compare number with boolean
[11/11/2010 14:43:12] stack traceback:
[11/11/2010 14:43:12] data/movements/scripts/portrait/abra.lua:3: in function <data/movements/scripts/portrait/abra.lua:1>
 
This is possible because if you put the pokeball on foot slot and the leg slot do not have any item, this error appear.
 
Back
Top