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

Skull System 0.4

Scorpvm

Member
Joined
Feb 23, 2010
Messages
434
Solutions
3
Reaction score
16
Location
Spain
Hi dears.
Anyone know how i fix me problem?
I need,
If some player get X frags then receive some type of skull:
Green Skull - 50 kills,
White Skull - 100 kills,
Yellow Skull - 200 kills,
Red Skull - 400 kills,
Black Skull -500 kills.

I know I have to edit the source

i have remove this from player.cpp:

Code:
 if((player == this || (skull != SKULL_NONE && player->getSkull() < SKULL_RED)) && player->hasAttacked(this))
			return SKULL_YELLOW;

and remove this:

Code:
if(skull == SKULL_NONE)
	{
		if(targetPlayer->getSkull() != SKULL_NONE)
			targetPlayer->sendCreatureSkull(this);
		else if(!hasCustomFlag(PlayerCustomFlag_NotGainSkull))
		{
			setSkull(SKULL_WHITE);
			g_game.updateCreatureSkull(this);
		}
	}
and add it in CREATURESCRIPTS :

Code:
local storage = 9000
 
function onKill(cid, target, lastHit)
	if isPlayer(target) and cid ~= target then
		local frags = math.max(0, getCreatureStorage(cid, storage)) + 1
		setPlayerStorageValue(cid, storage, frags)
		if frags >= 50 then
			doCreatureSetSkullType(cid, SKULL_GREEN)
		elseif frags >= 100 then
			doCreatureSetSkullType(cid, SKULL_WHITE)
		elseif frags >= 200 then
			doCreatureSetSkullType(cid, SKULL_YELLOW)
		elseif frags >= 400 then
			doCreatureSetSkullType(cid, SKULL_RED)
		elseif frags >= 500 then
			doCreatureSetSkullType(cid, SKULL_BLACK)
		end
	end
	return true
end

But my problem is that:
When player get 1 frag he get green skull and then he dont receives more skull

Sorry my bad english
 
Last edited:
Men open new thread, post is in abril 2011*
try this, not works.. open new thread

Lua:
<event type="kill" name="SullSystem" event="script" value="skull.lua"/>

login.lua
add
Lua:
registerCreatureEvent(cid, "SullSystem")
 
what isn't working? can't help if you don't post errors

if you're having nil function errors, change their names to the ones used in avesta
 
Lua:
doCreatureSetStorage(cid, 9000)
in onDeath and onLogout, or just onLogin
how i should build that script? pls im wating for your reply
regards @Cykotitan

i need a script that make the player keep skull when after log out im having that issue player loss skull after log out NOT WHEN HE LOST PZ JUST WHEN LOG OUT
 
Last edited:
Back
Top