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

[Request] Killing Spree

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Solutions
2
Reaction score
131
Location
Unknown
I need a script example:

function onKill
math.random (1-100)
if (math.random,6) then
broadcastmessage ('Reward: (random) gold coins if kill .."getCreatureName" )
doAddReward (getCreaturename,(randon)


if kills a killing spree player >> receive (random) gold coins


i need please
 
Last edited:
Humm be more detailed, how do you set a killing spree in you server ? with normal frags? and he gets a random gold amount?
 
Humm be more detailed, how do you set a killing spree in you server ? with normal frags? and he gets a random gold amount?

I read the script, I think he is saying this.

1. Player Gets A Killing Spree of 6 Or Higher.
2. Another Player Kills That Player.
3. The Player That Kills Him Gets A Random Gold Amount Between 1-100.

:)
 
my frag system is

frags= getPlayerStorageValue(cid,7256) << frags storage
ye and gets random gold coin depending of frags something
 
AH! He wants it league of legends style!

For example...

Player 1 = pro, and gets 6 frags..

Player 3 = kills player 1.. "Player 3 has earned 1000 gp for icing player 1's killing spree!"
 
example:

10 frags = random.golds (8~10golds)
20 frags = random.golds (30~40golds)
30 frags = random.golds (40~50golds)
 
example:

im a noob level 100 without frags - i go to kill a player where have killing spree >> i kill player -> i recieve 14 gold coins and ends your killing spree
 
Killstreak System. reset on login, add killstreakpoint on kill, add reward for kill.

killStreakPoints.lua @ creaturescripts/scripts.
Code:
function onKill(cid, target, lastHit)
-----Config-----
local killStreaks = 7257
local getKSP = getPlayerStorageValue(cid,killStreaks)
local addKSP = ((getPlayerStorageValue(cid,7257))+1)
----/Config-----

		if(isPlayer(cid) and isPlayer(target)) then
			if getPlayerIp(cid) == getPlayerIp(target) then
				doPlayerAddExperience(cid,-100000)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
			elseif getKSP == getKSP then
				setPlayerStorageValue(cid,killStreaks,addKSP)
				doPlayerSave(cid, true)
			end
		end
	return TRUE
end

killStreakEnder @ creaturescripts/scripts.

Code:
function onKill(cid, target, lastHit)
local addMoneyMath = ((getKSP)*2)
local reward = 2157
local killStreaks = 7257
local getKSP = getPlayerStorageValue(cid,killStreaks)

		if(isPlayer(cid) and isPlayer(target)) then
			if getPlayerIp(cid) == getPlayerIp(target) then
				doRemoveCreature(cid)
			elseif getKSP == getKSP then
				doPlayerAddItem(cid,reward,addMoneyMath)
			end
		end
	return TRUE
end

ADDITIONS TO OTHER FILES.

@ creaturescripts/creaturescripts.xml
Code:
<event type="kill" name="killStreakPoints" event="script" value="killStreakPoints.lua"/>

Code:
<event type="kill" name="killStreakEnder" event="script" value="killStreakEnder.lua"/>

@ creaturescripts/scripts/login.lua

after "if(lastLogin > 0) then" , add:
Code:
			setPlayerStorageValue(cid,7257,0)
add to area with other regesterCreatureEvents.
Code:
	registerCreatureEvent(cid, "killStreakPoints")
	registerCreatureEvent(cid, "killStreakEnder")

bug test this n tell me if I fudged up a bit :p
 
Last edited:
Lua:
elseif getKSP == getKSP then
?? :p
Why would you say
Lua:
if getPlayerStorageValue(cid,storage) == getPlayerStorageValue(cid,storage)
Storages has values, so it should be
Lua:
if getKSP == "NUMBER" then
 
Cuz i always get frustrated with not putting an if = soemthing else, when i start a command. Its more of a compuslive thing xD
so when i start with if something == itself, then i feel comfortable going on with what I'm doing.
 
Back
Top