1
AYUDA SYSTEMA Vie Ene 27, 2017 12:41 am
jesusaron

Miembro

Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...
jesusaron escribió:hola amigos nesesito su ayuda es relacionado con las bless o algo asi es decir que si me pudieran ayudar con un systema no se donde balla bueno, lo que quiero es algo asi, quiero acer un ot de war no tengo el systema pedido que cuando matan a un char no le quiten las cosas tfs 1.0 8.6
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Tu Has Sido Blesseado Por El Dios Del Bless!"
doSendMagicEffect(getCreaturePosition(cid), 18)
end
end
return TRUE
end
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
<event type="login" name="AutoBless" script="AutoBless.lua"/>
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "FULL BLESS"
doSendMagicEffect(getCreaturePosition(cid), 18)
end
return TRUE
end
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "FULL BLESS")
doSendMagicEffect(getCreaturePosition(cid), 18)
end
return TRUE
end
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid, "BLESSED", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 18)
return TRUE
end
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid,"Blessed",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 18)
end
end
end
return TRUE
end
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.
local maxlevel = 1000
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = (lvl * cost) / 500
local target = getPlayerGUID(cid)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You already have been blessed.")
return TRUE
end
end
if (getPlayerLevel(cid) >= maxlevel) then
if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerSendTextMessage(cid,19,"You have successfully all blessing , now do not need aol.")
end
else
doPlayerSendTextMessage(cid,19,"You need to have "..new_cost.."gp to buy blessings.")
end
elseif(getPlayerLevel(cid) < maxlevel) then
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerSendTextMessage(cid,19,"You have successfully been blessed.")
else
doPlayerSendTextMessage(cid,19,"You need to have "..cost.."gp to buy blessings.")
end
end
return FALSE
end
<talkaction words="!bless" event="script" value="bless.lua" />
local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then return false end function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then end doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid,'SpellUp') registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") return true end |
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
return false
end
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
end
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid,'SpellUp')
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "AutoBless")
return true
end
function onLogin(cid)
if isPlayer(cid) then
registerCreatureEvent(cid, "death_cid")
if getPlayerStorageValue(cid, 21894) == 1 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 30)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Full Bless")
doSendMagicEffect(getCreaturePosition(cid), 18)
end
end
return TRUE
end
for l = 1, 6 do
if not player:hasBlessing(l) then
player:addBlessing(l)
end end
Temas similares
Permisos de este foro:
No puedes responder a temas en este foro.
|
|