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

Frag Remove Rune

goodots

New Member
Joined
Feb 2, 2010
Messages
13
Reaction score
0
Witam,

Potrzebowałbym frag remove rune.
Do Tfs 0.3.5 albo jakies inne dzialajace rozwiazanie na usuwanie fragow i rs-a.

Pozdrawiam

Rep+
 
PHP:
<action itemid="9969" script="skullremove.lua"/>

skullremove.lua
Code:
-- Skull remove by Gelio
-- With little Gesior's help (frags remove)
function onUse(cid, item, frompos, item2, topos)
local zabieraLadunki = "tak"   -- Czy zabiera ladunki runy
local usuwaRedSkulla = "tak"   -- Czy usuwa red skulla
if((getPlayerSkullType(cid) ~= SKULL_RED or usuwaRedSkulla == "tak") or getPlayerSkullType(cid) ~= SKULL_GREEN) then
	doCreatureSetSkullType(cid, SKULL_NONE)
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You don't have any skull now.")
	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
	db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")  -- Usuwanie fragow. Usuniesz ta linijkę to nie będzie brać fragów
else
	doPlayerSendCancel(cid,"You can't remove red or green skull.")
end
if(zabieraLadunki == "tak") then
	if(item.type > 1) then
		doChangeTypeItem(item.uid, item.type-1)
	else
		doRemoveItem(item.uid,1)
	end
end
end
 
<action itemid="IDITEMA" event="script" value="tools/frag.lua"/>


frag.lua




local config =
{
item = XXXX, -- WPISZ ID ITEMA KTÓRY MA USUWAĆ FRAGI PRAWYM KLIKNIĘCIEM
level = 1,
count = 0
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= config.level then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your frags has been removed.")
doRemoveItem(item.uid)
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSetSkullEnd(cid, 0, SKULL_RED)
else
doPlayerSendCancel(cid, "You dot have enough level")
end
return TRUE
end
 

Similar threads

Back
Top