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

Equip DeEquip help

babalow

Nobody o/
Joined
Nov 7, 2007
Messages
393
Reaction score
1
Location
Brazil
:confused: What am I doing wrong? ;O
movements.xml
PHP:
<movevent type="Equip" itemid="2472" slot="armor" event="script" value="armors/test.lua">
  <vocation name="Knight"/>
  <vocation name="Paladin"/>
 </movevent>
 <movevent type="DeEquip" itemid="2472" slot="armor" event="script" value="armors/test.lua"/>
and...
test.lua
PHP:
function onEquip(cid, item, slot)
end
function onDeEquip(cid, item, slot)
end
:confused:
error? ;O
PHP:
[30/03/2009 13:42:51] [Warning - Event::loadScript] Can not load script (data/movements/scripts/armors/test.lua)
[30/03/2009 13:42:51] data/movements/scripts/armors/test.lua:1: unexpected symbol near 'ï'
[30/03/2009 13:42:51] [Warning - Event::loadScript] Can not load script (data/movements/scripts/armors/test.lua)
[30/03/2009 13:42:51] data/movements/scripts/armors/test.lua:1: unexpected symbol near 'ï'
[30/03/2009 13:42:51] Reloaded movements.
Latest TFS. (0.3.3)
 
Last edited:
Save the file (test.lua) under different file name.
Also don't forget to change it in movements.xml.
Are you kidding me right?! :eek:
...
PHP:
[31/03/2009 12:05:58] [Warning - Event::loadScript] Can not load script (data/movements/scripts/armors/mpa.lua)
[31/03/2009 12:05:58] data/movements/scripts/armors/mpa.lua:1: unexpected symbol near 'ï'
[31/03/2009 12:05:58] [Warning - Event::loadScript] Can not load script (data/movements/scripts/armors/mpa.lua)
[31/03/2009 12:05:58] data/movements/scripts/armors/mpa.lua:1: unexpected symbol near 'ï'
change the file name... GO READ A BOOK!
dont post useless things.
I REALLY need this. <_<
 
hehe, probably 'function onEquip(cid, item, slot)' :thumbup:
whatever I put in this function returns the same error..
example:
PHP:
function onEquip(cid, item, slot)
    doChangeSpeed(cid, 1000)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your speed now: ".. getCreatureSpeed(cid) ..".")
end
and..
PHP:
function onEquip(cid, item, slot)
end
the same error..

lef changed movements.xml
I think I'm writing this wrong..
PHP:
<movevent type="Equip" itemid="2472" slot="armor" event="script" value="armors/mpa.lua">
or something is wrong in sources.
I dont know.

edit: OPPPSSSS...
my bad.. I just saw what you have said now...
but still the same.. updating.
 
Last edited:
Noooo, you miss understood!

function onEquip(cid, item, slot)

end

okay now? :) \/

#ah ok you know now, but.. it must work.


#Edit

for me it works fine: example:
Code:
function onEquip(cid, item, slot)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You just weared mpa!")
	return TRUE
end
 
Last edited:
<movevent type="Equip" itemid="2472" slot="armor" event="function" value="onEquipItem"/>
</movevent>
<movevent type="DeEquip" itemid="2472" slot="armor" event="function" value="onDeEquipItem"/>

xD Why not use this-like? Or you want to script something there?

p.s. Anyway slawkens's version must works :>
 
Yes I want to script..
but I have no reason to script if it will not be loaded.
I know slawkens' version should work .. but here it's not working.
 
Also make sure your movements.xml is clean from any unwanted characters. If you'd like you could upload both files (at some file host) and I'll download them and check if anything is incorrect.
 

Similar threads

Back
Top