• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

I need script; ) please help ++

dragonnoob

Nie spamuje.
Joined
Aug 5, 2009
Messages
56
Reaction score
1
Hello!

Who can help me?

I need script when i click on monster (e.g. Rat) i can do action (e.g. get 1 crystal coin).

Please help me ;)

Rep++
 
Not possible in LUA

But you could make item and use it on monster and do action..
 
As I told. Impossible in LUA.
You can almost do everything else but no direct click on monster.
Possible: Use item on monster, target monster, look at monster and so on
 
do you mean if there is a dead rat you click on it and u get 1 cc and the rat disappear? // or when u attack it you get 1cc ?? or what? be more specified plz
 
If you mean by targeting a monster then you can use the function "onTarget" in creaturescripts.

This is an example, tested and working:

LUA:
function onTarget(cid, target)
	if getCreatureName(target) == 'Rat' then
		doPlayerAddItem(cid, 2160, 1)
	end	
	return true
end

PD. Probably you will want to add a storage functions to avoid getting 1938493849349 crystal coins every time someones target a "Rat" in this case.
 
Back
Top