Expêriencia: Iniciante
Sevidor: Sqlite
Procolo: 8.60
TFS: 0.3.6
Mapa: AlissowOT
Informações adicionais:
FIRSTITEMS.LUA
Olá, possuo o script firstitems.lua mais ele não está istalado pois meus chares estão começando sem nada no corpo, ou totalmente pelado, gostaria que alguem posta-se a tag, e registecreatureEvent para mim poder istalar e utilizar o firstitems.lua no meu servidor.
meuot\data\creaturescripts\scripts\firstitems.lua
local commonItems = {-- ITEMS ALL VOCS RECEIVE
{itemid=2480, count=1}, -- legion helmet
{itemid=2464, count=1}, -- chain armor
{itemid=2468, count=1}, -- studded legs
{itemid=2643, count=1}, -- leather boots
{itemid=2120, count=1}, -- rope
{itemid=5710, count=1} -- shovel
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190, count=1}, -- wand of vortex
{itemid=2175, count=1} -- spellbook
},
{ -- DRUID ITEMS
{itemid=2182, count=1}, -- snakebite rod
{itemid=2175, count=1} -- spellbook
},
{ -- PALADIN ITEMS
{itemid=2456, count=1}, -- bow
{itemid=2544, count=100} -- 100 arrows
},
{ -- KNIGHT ITEMS
{itemid=2412, count=1}, -- katana
{itemid=2530, count=1} -- copper shield
}
}
for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end
local storage = 35353
function onLogin(cid)
if getPlayerGroupId(cid) < 3 then
local receivedItems = getPlayerStorageValue(cid, storage)
if receivedItems == -1 then
--[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems ~= nil then
for _, v in ipairs(giveItems) do
--doAddContainerItem(backpack, v.itemid, v.count or 1)
doPlayerAddItem(cid, v.itemid, v.count or 1)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your first items!")
end
setPlayerStorageValue(cid, storage, 1)
end
return true
end
!NOTICE
Possuo !notice em meu talckactions mais não sei configurar para exibir a mensagem de minha escolha quando digo não acontece nada!! queria que me ensina-se como configurar ela como colocar uma mensagem a ser exibida quando o player disser !notice.
meuot\data\talckactions\scripts\notice.lua
--- Script by esK~------ Notice System 0.1 Beta ---
function onSay(cid, words, param)
file = io.open('noticias.txt','r')
notice = file:read(-1)
doShowTextDialog(cid,7528,notice)
file:close()
end
!Rank Frags
Tenho rank frags istalado no meu servidor, digo !rank frags aparece certonho, mais quando dou pk e mato otro player o frags dele não é registrado e não aparece quando digo !rank frags, alguem poderia me ajudar a fazer com que apareca?
meuot\data\talckactions\scripts\ranks.lua
local config = {MaxPlayer = 20,
fight_skills = {
['fist'] = 0,
['club'] = 1,
['sword'] = 2,
['axe'] = 3,
['distance'] = 4,
['shielding'] = 5,
['fishing'] = 6,
['dist'] = 4,
['shield'] = 5,
['fish'] = 6,
},
other_skills = {
[''] = "level",
['level'] = "level",
['magic'] = "maglevel",
['health'] = "healthmax",
['mana'] = "manamax"
},
vocations = {
['sorcerer'] = {1,5},
['druid'] = {2,6},
['paladin'] = {3,7},
['knight'] = {4,8}
},
storages = {
['frags'] = 824544
}
}
function onSay(cid, words, param)
local param,str = string.lower(param),""
if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] and not config.storages[param] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este rank não existe.") return true
end
str = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n"
query = config.fight_skills[param] and db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..config.fight_skills[param].." ORDER BY `value` DESC;") or config.other_skills[param] and db.getResult("SELECT `name`, `"..config.other_skills[param].."` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `"..config.other_skills[param].."` DESC, `name` ASC;") or config.storages[param] and db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..config.storages[param].." ORDER BY cast(value as INTEGER) DESC;") or db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 AND `vocation` = "..config.vocations[param][1].." or `vocation` = "..config.vocations[param][2].." ORDER BY `level` DESC;")
if (query:getID() ~= -1) then
k = 1
while true do
str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or config.storages[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[param] and "value" or config.storages[param] and "value" or config.vocations[param] and "level" or config.other_skills[param])) .. "]"
k = k + 1
if not(query:next()) or k > config.MaxPlayer then
break
end
end
query:free()
end
doShowTextDialog(cid,6500, str)
return true
end
vcontato: waguiinrodrigues_jf@live.com