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

[Request CreatureEvent] onAction

Exedion

Active Member
Joined
Jun 11, 2007
Messages
629
Reaction score
30
Hello, can someone if want of course, to make a c++ code for the creatureEvent onAction? is a standart script that can be execute with a simple click from the character, can checking items, action and unique ids if click in some item(s) or only execute with click anywhere, can be possible?

something like:
Code:
onAction(cid, item, aid, uid, fromPosition, itemEx, toPosition)
 
Hello, can someone if want of course, to make a c++ code for the creatureEvent onAction? is a standart script that can be execute with a simple click from the character, can checking items, action and unique ids if click in some item(s) or only execute with click anywhere, can be possible?

something like:
Code:
onAction(cid, item, aid, uid, fromPosition, itemEx, toPosition)

instead item, aid, uid could be item as an array, just like actions p:

and shouldnt be the same of using normal actions?xdd
 
instead item, aid, uid could be item as an array, just like actions p:

and shouldnt be the same of using normal actions?xdd

nope because in actions you need declare a itemid, aid or uid for make the "actions", with this, you can execute the "action" clicking anywhere and recognize if a specified item is declare in the script
 
No.
If you use actionid or aid in action.xml then use this
If item.actionid == 2000 then
Or
If item.uid == 1500 then

yes but you ever need use this:
PHP:
	<action actionid="2001" event="script" value="quests/system.lua"/>
	<action uniqueid="30015" event="script" value="quests/annihilator.lua"/>
	<action itemid="2146" event="script" value="other/enchanting.lua"/>

to execute an action!

example, if i need do an achievement for using/clicking EVERYTHING, with actions will put something like this:
PHP:
<action itemid="0000-9999999999999999999999" event="script" value="blah blah/blah blah.lua"/>

and this give me error because is sure other items have assigned anothers scripts

i need a function to execute scripts when you click anywhere! but with paramethers to make anothers special conditions like:

LUA:
function onAction(cid, item, aid, uid, fromPosition, itemEx, toPosition) -- or can be onClick
if(pos = xyz) then -- clicking in specific position
         doSomethingForQuestOrMission(cid)
   return true
end

understend my idea?
 
Last edited:
Back
Top