• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request Help [SCRIPT]

GOD Fito

Member
Joined
Oct 3, 2008
Messages
97
Solutions
1
Reaction score
9
Hello otland

Today I am looking for someone who can make me any of these action.lua or creaturescripts.lua not sure, but I'll say what I want.

This is my second time I make a topic to ask something, my first subject responded not so much I would appreciate help with this and is this ...

My idea was to create a door that will not let you go if you do not take 20 kills, i dont know if this is action.lua or creaturescript.lua but would be very grateful if you help me with that ..!

And sorry for the speech ^ hahaha well I hope your answer

Thanks.
 
Could you explain better please?
What does "take 20 kills" mean ?

You have to kill 20 players ? 20 specific monsters ? You have to die 20 times ?
 
put this into creature scripts
LUA:
function onKill(cid, target, lastHit)
	if isPlayer(cid) and isPlayer(target) then
		if getCreatureStorage(cid, 3000) < 0 then
			doCreatureSetStorage(cid, 3000, 0)
		end
		local storage = 3000
		doCreatureSetStorage(cid, 3000, getCreatureStorage(cid, 3000) + 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You just killed ".. getCreatureName(target) .." for a total of ".. getCreatureStorage(cid, 3000) .." frags!")
	end
	return true
end

actions
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureStorage(cid, 3000) >= 20 then
		local xyz = {x = 1000, y = 1000, z = 7)
		doTeleportThing(cid, xyz)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need 20 frags to enter! You currently have ".. getCreatureStorage(cid, 3000) ..". ")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end
 
Last edited:
[20/08/2012 16:55:06] [Error - CreatureScript Interface]
[20/08/2012 16:55:06] data/creaturescripts/scripts/fragskills.lua:onKill
[20/08/2012 16:55:06] Description:
[20/08/2012 16:55:06] (luaGetCreatureStorage) Creature not found

[20/08/2012 16:55:06] [Error - CreatureScript Interface]
[20/08/2012 16:55:06] data/creaturescripts/scripts/fragskills.lua:onKill
[20/08/2012 16:55:06] Description:
[20/08/2012 16:55:06] data/creaturescripts/scripts/fragskills.lua:7: attempt to perform arithmetic on a boolean value
[20/08/2012 16:55:06] stack traceback:
[20/08/2012 16:55:06] data/creaturescripts/scripts/fragskills.lua:7: in function <data/creaturescripts/scripts/fragskills.lua:1>
 
Thx men it works! one more thing you can do a talkaction >> !kills say how many murders have you.. :) and other top 10 kills.. >>!topkills i would greatly appreciate it
 
talk actions
LUA:
function onSay(cid, words, param, channel)
	local x = getCreatureStorage(cid, 3000)
	if x > 0
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have ".. x .." kills!")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORAGNE, "You have no kills!")
	end
	return true
end

can't do the high score list properly because you need to use db queries to get offline storages and I just suggest not to do it.
 
oka , thx bro!

- - - Updated - - -

[21/08/2012 20:52:36] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/kills.lua:4: 'then' expected near 'doPlayerSendTextMessage'
[21/08/2012 20:52:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/kills.lua)
[21/08/2012 20:52:36] data/talkactions/scripts/kills.lua:4: 'then' expected near 'doPlayerSendTextMessage'
 
Last edited:
Back
Top