RunarM
Finally back
Player Information...
Data/Talkaction/Scripts
Info.lua
in Talkaction.xml
Picture ingame:
How to use it:
1. login to your server
2. say !info [PLAYERNAME]
3. then you get info about that player =)
Kind Regards, Runarm.
Data/Talkaction/Scripts
Info.lua
Lua:
local vocations = {"None","Sorcerer","Druid","Paladin","Knight","Master Sorcerer","Elder Druid","Royal Paladin","Elite Knight"}
local displayoutput = {"Fist: ","Club: ","Sword: ","Axe: ","Distance: ","Shielding: ","Fishing: "}
function onSay(cid, words, param)
local player = db.getResult("SELECT `name`, `level`, `maglevel`, `id`, `vocation` FROM `players` WHERE `group_id` < 2 and `name` = '"..param.."'")
if(player:getID() ~= -1) then
local name = player:getDataString("name")
local level = player:getDataInt("level")
local GUID = player:getDataInt("id")
local vocationid = player:getDataInt("vocation")
local maglevel = player:getDataInt("maglevel")
vocation = vocations[vocationid+1]
heading = "Name: "..name.."\nLevel: "..level.."\nVocation: "..vocation.."\n\n"
skilllist = "Magic: "..maglevel.."\n"
local skills = db.getResult("SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = '"..GUID.."' ")
if(skills:getID() ~= -1) then
while(true) do
local skillid = skills:getDataInt("skillid")
local value = skills:getDataInt("value")
skilllist = skilllist..displayoutput[skillid+1].." "..value.."\n"
if not(skills:next()) then
break
end
end
skills:free()
end
final = heading..skilllist
doShowTextDialog(cid,5958, final)
player:free()
else
doPlayerSendCancel(cid, "Invalid Player Name.")
end
end
in Talkaction.xml
Code:
<talkaction words="!info" script="info.lua"/>
Picture ingame:
How to use it:
1. login to your server
2. say !info [PLAYERNAME]
3. then you get info about that player =)
Kind Regards, Runarm.
Last edited: