- Joined
- Aug 19, 2007
- Messages
- 4,941
- Solutions
- 11
- Reaction score
- 352
ALL CREDITS GO TO NIKOLAS!
I have just rewritten some to work for 8.0 (TFS), so here it is:
data/talkactions/scripts
create bookinfo.lua and paste in:
Now data/talkactions/talkactions.xml
Paste in:
To use it write in-game
!book "PlayersName
For the ones who doesn't know what it do, this talkaction is creating a book with informations inside about the player whose name you have written in command, it is showing his lvl, mlvl, skill, position, group_id, vocation and money (in bp).
I have just rewritten some to work for 8.0 (TFS), so here it is:
data/talkactions/scripts
create bookinfo.lua and paste in:
Code:
function onSay(cid,words,param)
local player = getPlayerByName(param)
if getPlayerGroupId(cid) >= 3 then
if isPlayer(player) == 1 then
book = doPlayerAddItem(cid, 1986, 1)
doPlayerSendTextMessage(cid, 22, 'You have created a book about '..getPlayerName(player)..'.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_GREEN)
doSetItemSpecialDescription(book, 'This is a book about '..getPlayerName(player)..'.')
doSetItemText(book, 'Information about '..getPlayerName(player)..': \nLevel: '..getPlayerLevel(player)..'\nMagic Level: '..getPlayerMagLevel(player)..'\n\nCurrent Status:\nHealth: '..getCreatureHealth(player)..'/'..getCreatureMaxHealth(player)..'\nMana: '..getPlayerMana(player)..'/'..getPlayerMaxMana(player)..'\n\nSkills: \nFist: '..getPlayerSkill(player,0)..'\nClub: '..getPlayerSkill(player,1)..'\nSword: '..getPlayerSkill(player,2)..'\nAxe: '..getPlayerSkill(player,3)..'\nDistance: '..getPlayerSkill(player,4)..'\nShield: '..getPlayerSkill(player,5)..'\nFishing: '..getPlayerSkill(player,6)..'\n\nCurrent Position:\nX = '..getPlayerPosition(player).x..'\nY = '..getPlayerPosition(player).y..'\nZ = '..getPlayerPosition(player).z..'\nGroup ID = '..getPlayerGroupId(player)..'\nPlayer Vocation ID = '..getPlayerVocation(player)..'\n\nMoney:\nCrystal Coins = '..getPlayerItemCount(player, 2160)..'\nPlatinum Coins = '..getPlayerItemCount(player, 2152)..'\nGold Coins = '..getPlayerItemCount(player, 2148)..'\n----------- The End -----------')
else
doPlayerSendCancel(cid, 'A player with this name is not online.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
return 0
end
end
Now data/talkactions/talkactions.xml
Paste in:
Code:
<talkaction words="!book" script="bookinfo.lua"/>
To use it write in-game
!book "PlayersName
For the ones who doesn't know what it do, this talkaction is creating a book with informations inside about the player whose name you have written in command, it is showing his lvl, mlvl, skill, position, group_id, vocation and money (in bp).
Last edited: