• 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!

CreatureEvent Working Forever aol - counting frags !!

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
Im here to release my script, it counts frags, also say a animated text "Forever aol! No loot For you!" When the player dies with rs.

In Creaturescripts.xml under login put
Code:
        <event type="preparedeath" name="Forever Aol" event="script" value="Forever Aol.lua"/>
        <event type="login" name="Welcome!" script="loginserver.lua"/>



creatureevents/scripts/Forever Aol.lua
Code:
  function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getCreatureSkullType(cid)  >= 4) then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
                doCreatureSay(cid, "Forever Aol!! NO LOOT FOR YOU!", TALKTYPE_ORANGE_1)
        end
        return true
        end
        return true
        end



Now loggin:
Code:
local config = {
	loginMessage = getConfigValue('loginMessage')
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	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, "Idle")
	registerCreatureEvent(cid, "SkullCheck")
	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "Forever Aol")
	return true
end
OBS: those registercreatureevent depends on ur server ._. i think is just add those but lol

Hope us enjoy it
 
Last edited:
Code:
<event type="login" name="Welcome!" script="loginserver.lua"/>
u dont rlly need this
 
Back
Top