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

!myinfo - Show player life and Mana.

Status
Not open for further replies.

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
Like this:
You have 1300/1380 mana and 1230/1700 life.
 
talkactions/scripts/myinfo.lua
Code:
function onSay(cid, words, param, channel)
	doPlayerSendTextMessage(cid, 27, "You have " .. getCreatureHealth(cid) .. "/" .. getCreatureMaxHealth(cid) .. " health and " .. getCreatureMana(cid) .. "/" .. getCreatureMaxMana(cid) .. " mana.")
return true
end

PHP:
<talkaction words="!myinfo" event="script" value="myinfo.lua"/>
 
Last edited:
[31/03/2010 22:02:44] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/myinfo.lua)
[31/03/2010 22:02:44] data/talkactions/scripts/myinfo.lua:2: ')' expected near 'getCreatureMaxMana'
 
Code:
function onSay(cid, words, param)
           doPlayerSendTextMessage(cid, 20, "Stats:\nHealth: " .. getCreatureHealth(cid) .. "\nMana: " .. getCreatureMana(cid) .. "")
           return true
end
 
Status
Not open for further replies.
Back
Top