How many threads of this have you created? ?? ? ? ?? ? `? ? ? ? ??ähello otlanders today i request for 1 important script for war server.
SCRIPT:
If you Kill 2 Time same Player You will not get Exp For Next 1 Houre.. (NOT MC)
Version: 8.6 0.3.6
So pls IF any Body have Idea Of scripts pls help me
How many threads of this have you created? ?? ? ? ?? ? `? ? ? ? ??ä
oh okeyOld threads has been deleted from staff team they say not alouded to Buy or Sell etc
So pls sir can you help me! I Am searching this script from 2 months and not founded
dofile("config.lua")
local bool = getBooleanFromString("rateExperience")
function onKill(cid, target)
if(not isPlayer(target)) then
return true
end
if(not isPlayer(cid)) then
return true
end
local storage = getPlayerGUID(target)
if getPlayerStorageValue(cid, storage) <= 0 then
setPlayerStorageValue(cid, storage, 1)
setPlayerStorageValue(target, storage, 1)
elseif getPlayerStorageValue(cid, storage) == 1
setPlayerStorageValue(cid, storage, 2)
setPlayerStorageValue(target, storage, 2)
doPlayerSetExtraExpRate(cid, -bool)
addEvent(setEXP, 1 * 1000, cid, target, storage)
elseif getPlayerStorageValue(cid, storage) == 2 then
doPlayerSetExtraExpRate(cid, -bool)
addEvent(setEXP2, 1 * 1000, cid, target, storage)
end
return true
end
function setEXP(cid, target, storage)
doPlayerSetExtraExpRate(cid, bool)
addEvent(setStorage, 1 * 60 * 1000 * 60, cid, target)
end
function setEXP2(cid, target, storage)
doPlayerSetExtraExpRate(cid, bool)
end
function setStorage(cid, target, storage)
setPlayerStorageValue(cid, storage, 0)
setPlayerStorageValue(target, storage, 0)
end
This might be what you are looking for...
Its not tested sorry.
Code:dofile("config.lua") local bool = getBooleanFromString("rateExperience") function onKill(cid, target) if(not isPlayer(target)) then return true end if(not isPlayer(cid)) then return true end local storage = getPlayerGUID(target) if getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) setPlayerStorageValue(target, storage, 1) elseif getPlayerStorageValue(cid, storage) == 1 setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(target, storage, 2) doPlayerSetExtraExpRate(cid, -bool) addEvent(setEXP, 1 * 1000, cid, target, storage) elseif getPlayerStorageValue(cid, storage) == 2 then doPlayerSetExtraExpRate(cid, -bool) addEvent(setEXP2, 1 * 1000, cid, target, storage) end return true end function setEXP(cid, target, storage) doPlayerSetExtraExpRate(cid, bool) addEvent(setStorage, 1 * 60 * 1000 * 60, cid, target) end function setEXP2(cid, target, storage) doPlayerSetExtraExpRate(cid, bool) end function setStorage(cid, target, storage) setPlayerStorageValue(cid, storage, 0) setPlayerStorageValue(target, storage, 0) end
It lasts for an hour that way.
dofile("config.lua")
local bool = getBooleanFromString("rateExperience")
local kills_max = 2 --Amount of times they can kill player in a row before no exp.--
local time_no_exp = 15 --Amount of time they must wait to gain EXP in minutes--
function onKill(cid, target)
if not isPlayer(cid) or not isPlayer(target) then return true end
local storage = getPlayerGUID(target)
local p_storage = getPlayerStorageValue(cid, storage)
if p_storage <= 0 then
setPlayerStorageValue(cid, storage, 1)
elseif p_storage > 0 and p_storages < kills_max then
setPlayerStorageValue(cid, storage, p_storage + 1)
elseif p_storage == kills_max then
doPlayerSetExtraExpRate(cid, -bool)
setPlayerStorageValue(cid, storage, kills_max + 1)
addEvent(resetEXP, 1000, cid)
elseif p_storage > kills_max then
doPlayerSetExtraExpRate(cid, -bool)
addEvent(resetEXP, 1000, cid)
end
return true
end
function resetEXP(cid)
doPlayerSetExtraExpRate(cid, bool)
if getPlayerStorageValue(cid, storage) == kills_max + 1 then
setPlayerStorageValue(cid, storage, kills_max + 2)
addEvent(resetStorage, time * 60 * 1000, cid)
end
end
function resetStorage(cid)
setPlayerStorageValue(cid, storage, 0)
end