• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

The best VIP system ever! [Action/Movevent/Globalevent]

I'm getting this error qwhen logging any character:
Lua:
[25/08/2011 16:52:41] Error during getDataInt(vip_time).
[25/08/2011 16:52:41] Error during getDataInt(vip_time).
[25/08/2011 16:52:41] Error during getDataInt(vip_time).
 
I'm getting this error qwhen logging any character:
Lua:
[25/08/2011 16:52:41] Error during getDataInt(vip_time).
[25/08/2011 16:52:41] Error during getDataInt(vip_time).
[25/08/2011 16:52:41] Error during getDataInt(vip_time).

Maybe you don't have the row, not sure.
AFAIK only Mock's system uses "vip_time" this uses "vipdays".
 
Sometimes, i got this error:
errorsc.png
 
is possible add function getPlayerVipDays(cid) in this spells
only vips can use?

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS,  30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 160)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
        if exhaustion.check(cid, 23001) == false then
                exhaustion.set(cid, 23001, 60)
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You have exhausted in intense recovery for: [" ..exhaustion.get(cid, 23001).."] seconds")
    end
end

help me please?
 
Lua:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

local condition = createConditionObject(CONDITION_REGENERATION) 
local vip = getPlayerVipDays(cid)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1) 
setConditionParam(condition, CONDITION_PARAM_BUFF, true) 
setConditionParam(condition, CONDITION_PARAM_TICKS,  30 * 1000) 
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 160) 
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000) 
setCombatCondition(combat, condition) 

function onCastSpell(cid, var) 
    if vip then
	 if exhaustion.check(cid, 23001) == false then 
                exhaustion.set(cid, 23001, 60) 
                return doCombat(cid, combat, var) 
        else 
                doPlayerSendCancel(cid, "You have exhausted in intense recovery for: [" ..exhaustion.get(cid, 23001).."] seconds") 
    	end 
    else
	doPlayerSendCancel(cid, "You need VIP to use this spell")
    end	
end
 
look this error:
bug1.jpg

and line 711 on 050-functions

PHP:
--- Vip functions by Kekox
function getPlayerVipDays(cid)
    local Info = db.getResult("SELECT `vipdays` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
        if Info:getID() ~= LUA_ERROR then
        local days= Info:getDataInt("vipdays")
        Info:free()
        return days
    end
     return LUA_ERROR
end

script:

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_REGENERATION)
local vip = getPlayerVipDays(cid)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS,  30 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 160)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setConditionParam(condition, CONDITION_PARAM_MANAGAIN, 120)
setConditionParam(condition, CONDITION_PARAM_MANATICKS, 3000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
    if vip then
        if exhaustion.check(cid, 23001) == false then
                exhaustion.set(cid, 23001, 60)
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You have exhausted in intense recovery for: [" ..exhaustion.get(cid, 23001).."] seconds")
    	end 
    else
	doPlayerSendCancel(cid, "You need have premium gold to use this spell")
    end	
end
 
Lua:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

local condition = createConditionObject(CONDITION_REGENERATION) 

setConditionParam(condition, CONDITION_PARAM_SUBID, 1) 
setConditionParam(condition, CONDITION_PARAM_BUFF, true) 
setConditionParam(condition, CONDITION_PARAM_TICKS,  30 * 1000) 
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 160) 
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000) 
setCombatCondition(combat, condition) 

function onCastSpell(cid, var) 
    if(getPlayerVipDays(cid) > 0) then
	 if exhaustion.check(cid, 23001) == false then 
                exhaustion.set(cid, 23001, 60) 
                return doCombat(cid, combat, var) 
        else 
                doPlayerSendCancel(cid, "You have exhausted in intense recovery for: [" ..exhaustion.get(cid, 23001).."] seconds") 
    	end 
    else
	doPlayerSendCancel(cid, "You need VIP to use this spell")
    end	
end
 
Hello guys, I dont got globalevents in my 8.60 server 0.6.3 SVN is there any solution to this? I'm trying to convert my 8.54 server to 8.60 I'm fixing things now and when I took files from my old server I didnt find globalevents in the new one, anyone please?
 
Back
Top