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

Can someone fix this to tfs 0.3.6? rep will earned!

pokeot

New Member
Joined
Oct 8, 2010
Messages
69
Reaction score
1
I found this in Sync theard.

Code:
function onKill(cid, target)
 
local config = {
item = 6500, -- Demonic Essence
store = getPlayerStorageValue(cid, 6000), -- storrage for Current frags
tstore = getPlayerStorageValue(cid, 7000), -- Total Storage value for kills
dstore = getPlayerStorageValue(cid, 8000), -- Total Storage value for deaths 
rand = math.random(1,4),
pos = getPlayerPosition(cid)
}
	local table = {
	{"Smashed!", 189, 1},
	{"Dead!", 190, 2},
	{"Owned!", 18, 3},
	{"Pwnt!", 215, 4}
}
 
	if isPlayer(target) == true then
	setPlayerStorageValue(cid, 6000, (config.store+1))  
		setPlayerStorageValue(cid, 7000, (config.tstore+1))
            setPlayerStorageValue(target, 8000, (config.dstore+1))
              doPlayerSetRedSkullTicks(cid, 0)
 
local rand = math.random(1, #table)
doSendAnimatedText(config.pos, table[rand][1], tablica[rand][2])
doPlayerAddItem(cid, config.item, table[rand][3])
 
 
        if(getPlayerStorageValue(cid, 6000) == 5) then
				broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 10) then
                broadcastMessage(getCreatureName(cid) .. " is dominating! He killed 10 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 25) then
			broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 25 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 50) then
				broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 50 players! DO SOMETHING!")
			elseif(getPlayerStorageValue(cid, 6000) == 100) then
            	broadcastMessage("Bow down to your new god " ..getCreatureName(cid).. " has 100 frags!")
            end
            	return TRUE
               end	
                   end
 
i get many error if i fix that i get a other error, this script is not tfs 0.3.6 i think so someone must edit it.
 
Lua:
local c = {
	item = 6500, -- Demonic Essence
	store = 6000, -- storrage for Current frags
	tstore = 7000, -- Total Storage value for kills
	dstore = 8000, -- Total Storage value for deaths
	table = {
		{"Smashed!", 189, 1},
		{"Dead!", 190, 2},
		{"Owned!", 18, 3},
		{"Pwnt!", 215, 4}
	}
}
 
function onKill(cid, target)
	local storage = getPlayerStorageValue(cid, store)
	if isPlayer(target) == true then
		setPlayerStorageValue(cid, store, (storage + 1))
		setPlayerStorageValue(cid, tstore, (getPlayerStorageValue(cid, tstore) +1))
		setPlayerStorageValue(target, dstore, (getPlayerStorageValue(cid, dstore) + 1))
 
		local rand = math.random(1, #c.table)
		doSendAnimatedText(getPlayerPosition(cid), c.table[rand][1], c.table[rand][2])
		doPlayerAddItem(cid, c.item, c.table[rand][3])
 
		if(storage == 5) then
			broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
		elseif(storage == 10) then
			broadcastMessage(getCreatureName(cid) .. " is dominating! He killed 10 players!")
		elseif(storage == 25) then
			broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 25 players!")
		elseif(storage == 50) then
			broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 50 players! DO SOMETHING!")
		elseif(storage == 100) then
			broadcastMessage("Bow down to your new god "..getCreatureName(cid).." has 100 frags!")
		end
	end
	return true
end
clean
 
Last edited:
I get this error :/
[08/12/2011 15:58:56] [Error - CreatureScript Interface]
[08/12/2011 15:58:56] data/creaturescripts/scripts/cs.lua:eek:nKill
[08/12/2011 15:58:56] Description:
[08/12/2011 15:58:56] data/creaturescripts/scripts/cs.lua:19: attempt to call global 'doPlayerSetRedSkullTicks' (a nil value)
[08/12/2011 15:58:56] stack traceback:
[08/12/2011 15:58:56] data/creaturescripts/scripts/cs.lua:19: in function <data/creaturescripts/scripts/cs.lua:14>
 
Now it work 90% THANKS REPP!! but could you do like this, when i kill someone example the text SMASHED i want it go like the text go like this first S then m contiune! and instead that the text smashed, owned comming on the killer it should come on the dead body!

Help:
Ey i get problem when i get we say killing spree then if i die or logg out it should reset my frags and i will begin with 0 frags so i can get killing spree again! please fix
 
Last edited:
Now it work 90% THANKS REPP!! but could you do like this, when i kill someone example the text SMASHED i want it go like the text go like this first S then m contiune! and instead that the text smashed, owned comming on the killer it should come on the dead body!

Help:
Ey i get problem when i get we say killing spree then if i die or logg out it should reset my frags and i will begin with 0 frags so i can get killing spree again! please fix

Go to your Creaturescripts folder and create a file named checkspree.lua and put:
Lua:
function onLogin(cid)
local config={
	store = 6000 -- storrage for Current frags
}

if getPlayerStorageValue(cid, config.store) > 0 then
        setPlayerStorageValue(cid, config.store, 0)
end

return true
end

Add
Lua:
registerCreatureEvent(cid, "checkspree")
in your login.lua



and add
Lua:
 <event type="login" name="checkspree" script="checkspree.lua"/>
in your creaturescripts.xml
 
Last edited:
it doesnt work, i added it and still dont remove it storage! and a other problem when i kill 3 people is saying killing spree when it says 5 people please someone fix the broadcast too!
 
The broadcast is bugged or smth, i kill a plyer 3 times when it configured that after 5 times it gone broadcast killing spree someone should fix the broadcast!
 
Lua:
local c = {
	item = 6500, -- Demonic Essence
	store = 6000, -- storrage for Current frags
	tstore = 7000, -- Total Storage value for kills
	dstore = 8000, -- Total Storage value for deaths
	table = {
		{"Smashed!", 189, 1},
		{"Dead!", 190, 2},
		{"Owned!", 18, 3},
		{"Pwnt!", 215, 4}
	}
}
 
function onKill(cid, target)
	local storage = getPlayerStorageValue(cid, c.store)
	if isPlayer(target) == true then
		setPlayerStorageValue(cid, c.store, (storage + 1))
		setPlayerStorageValue(cid, c.tstore, (getPlayerStorageValue(cid, tstore) +1))
		setPlayerStorageValue(target, c.dstore, (getPlayerStorageValue(cid, dstore) + 1))
 
		local rand = math.random(1, #c.table)
		doSendAnimatedText(getPlayerPosition(cid), c.table[rand][1], c.table[rand][2])
		doPlayerAddItem(cid, c.item, c.table[rand][3])
 
		if(storage == 5) then
			broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed "..storage.." players!")
		elseif(storage == 10) then
			broadcastMessage(getCreatureName(cid) .. " is dominating! He killed "..storage.." players!")
		elseif(storage == 25) then
			broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed "..storage.." players!")
		elseif(storage == 50) then
			broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed "..storage.." players! DO SOMETHING!")
		elseif(storage == 100) then
			broadcastMessage("Bow down to your new god "..getCreatureName(cid).." has "..storage.." frags!")
		end
	end
	return true
end
 
Last edited:
i get this error:
[08/12/2011 18:35:12] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/cs.lua:7: '}' expected (to close '{' at line 1) near 'table'
[08/12/2011 18:35:12] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/cs.lua)
[08/12/2011 18:35:12] data/creaturescripts/scripts/cs.lua:7: '}' expected (to close '{' at line 1) near 'table'
 
Wall when i kill someone 4 times is saying killing spree then, if i kill someone more times it doesnt broad cast smth!

And i dont get any errors.
 
Back
Top