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

kosyer

New Member
Joined
Feb 15, 2009
Messages
116
Reaction score
0
Greetings everyone!

Im needing a script that checks players frags and then add current frags to the description like "You see yourself. You are a druid. U got x frags" if its too hard. Show me a code that can do it in source editing :)

Script must work with 0.3.5 crying damson!
Rep if someone can make it!;)
 
Last edited:
I have tryed to make it in c++. But dont know the variable to frags so i can put them in the comments + im not so skilled either for it :p. Lua is really new for me. So i need to start from the ground :/
 
onLook?
----
/data/creaturescripts/creaturescripts.xml
HTML:
<event type="look" name="Look" event="script" value="look.lua"/>
<event type="kill" name="Kill" event="script" value="kill.lua"/>

/data/creaturescripts/scripts/look.lua
Lua:
function onLook(cid, thing, position, lookDistance)
	local getFrags = getPlayerSoul(thing.uid)
	if isPlayer(thing.uid) and getPlayerAccess(thing.uid) < 3 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Frags: " .. getFrags)
	end
	return TRUE
end
/data/creaturescripts/scripts/kill.lua
Lua:
local soulGainPerKill = 1

function onKill(cid, target)
	if isPlayer(target) then
		doPlayerAddSoul(cid, getPlayerSoul(cid) + soulGainPerKill)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You killed " .. getCreatureName(target))
	end
	return true
end

Add in /data/creaturescripts/scripts/login.lua
Lua:
registerCreatureEvent(cid, "Look")
registerCreatureEvent(cid, "Kill")
 
Last edited:
No mates. Think u get it wrong. I mean in like wars. When u click on other players. It can shall be like "you see peder. She is a sorcerer. She got xx frags" This is good for wars. :p Got it? And thanks for other scripts Pyromental. Will get handy too :D
 
How come you don't use the one I sent you in PM?
It should work, but it isn't on the players name, its floating above their head.
 
On creaturescripts
on login
donate plix
Lua:
function onLook(cid, thing, position, lookDistance)
	return doPlayerShowFragsCount(cid, thing, position, lookDistance)
end
 
Back
Top Bottom