• 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] War Sripts <4> Check :)

thief

Member
Joined
Sep 23, 2008
Messages
342
Reaction score
16
Location
Canada
Okay, I'm using the latest TFS and I would need 3 scripts.

*Each time you kill someone with any skulls yellow-red, no skuls you get a frag.
*When you kill someone, its will show how many frags on you
*When you have 10frags,25,40 frags it will show in broadcast in red playername has reached xx frags
*A frag door, like level door but instead its require frags
Thanks!!
*When you have 10 kill, you gain yellow skull, when you have 25 kills + you have red skull
 
Last edited:
Frag door:

Code:
function onUse(cid, item, frompos, item2, topos)
 place = {x=100, y=100, z=7, stackpos=253}
  temple = {x=110, y=100, z=7, stackpos=253}
 
   	getPlayerFrags(cid) >= 25 then
   	   doTeleportThing(cid,place)
   	   doSendMagicEffect(place,2)
                                 else
   			doPlayerSendTextMessage(cid,22,"You need to get 25 kills befor you can go thru the door.")
   			doTeleportThing(cid,temple)
   		end 
   		    end

Aware on frags

Code:
function onKill(cid, target)
	local amount = getPlayerRedSkullTicks(cid)
	if(amount > 0 and config.fragTime > 0) then
		local frags = math.floor((amount / config.fragTime) + 1)
		      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. frags .. " You rock!")
		      end
		         end

Broadcast on Frag gain.

Code:
function onKill(cid, target)
	if getPlayerFrags(cid) == 10 then
	 broadcastMessage(getCreatureName(cid) .. " has gotten 10 Frags!, MESSAGE_STATUS_WARNING")
	elseif getPlayerFrags(cid) == 25 then
	       broadcastMessage(getCreatureName(cid) .. " has gotten 25 Frags!, MESSAGE_STATUS_WARNING")
	elseif getPlayerFrags(cid) == 40 then
	 broadcastMessage(getCreatureName(cid) .. " has gotten 40 Frags!, MESSAGE_STATUS_WARNING")
			end
		end

Set Skull

Code:
function onKill(cid, target)
  if getPlayerFrags(cid) == 10 then 
    doCreatureSetSkullType(cid, 1)  -- 1 is yellow skull
  elseif getPlayerFrags(cid) == 25 then
    doCreatureSetSkullType(cid, 4)  -- 4 is red skull
    end
       end
 
Last edited:
I will test them right away and see the results

WEll, I have a problem.. I have set my server to pvp-enforced so you may not gain any frags but if I change it to pvp so the skulls actualy will work well I'll get banned right away for over kills... And seting 99 kills in lua for ban is not a solution. Anyone knows how to fix so I have skulls system, but its pvp-enforced?

"killsToBan = 0" Didn't work killsToBan = 99 Didn't work... I need a script so it never gets banned from over killing players.. ;(

how does your frag door works? whats the door ID for it?
 
Last edited:
Frag door:

Code:
function onUse(cid, item, frompos, item2, topos)
 place = {x=100, y=100, z=7, stackpos=253}
  temple = {x=110, y=100, z=7, stackpos=253}
 
   	if getPlayerFrags(cid) == 25 then
   	   doTeleportThing(cid,place)
   	   doSendMagicEffect(place,2)
                                 else
   			doPlayerSendTextMessage(cid,22,"You need to get 25 kills befor you can go thru the door.")
   			doTeleportThing(cid,temple)
   		end 
   		    end

Remember:

Code:
getPlayerFrags(cid) == 25 then

Should be:

Code:
getPlayerFrags(cid) >= 25 then

Since Im guessing he wants players with 25+ frags to be able to pass, and not exactly 25.

But good job on the scripts, havent tested any but the "frag door" and "broadcast" scripts should work fine. Im gonna play a bit with them when Im home. +Repped

Btw you should test the "set skull" one because Im pretty sure I saw somewhere that it can only be done by editing sources, since doing it with onKill will not save the skull after relogging or something like that.

Cheers.
 
@up yeah i just realized that thanks for pointin that out, and yeah test out the skull script and tell me if it works

First, character may not save so it deson't mind, when they die they will relog back to temple with the stats of the begining and no skulls.

I can't test broadcast and set skull because when my server is on mode pvp-enforced i may not gain any skulls and when my server is on mode pvp i will get banned for overkill...someone can solve this?
 
if someone could aslo get me a script so when you mc you dont gain any exp or frags? :p

edit:
09:05 Warning! The murder of Druid 07 was not justified.
09:05 You advanced from Level 46 to Level 47.
09:05 You do not have any unjustified frag.
Someone is wrong... its say i've done unjustified frag but i dont get a frag lol


edit:
I can login over people characters... if someone is already login in the character, i want the person to not be able to get on it. clone = 0


edit::
I need an NPC to make private account... :O
 
Last edited:
if someone could aslo get me a script so when you mc you dont gain any exp or frags? :p

edit:
09:05 Warning! The murder of Druid 07 was not justified.
09:05 You advanced from Level 46 to Level 47.
09:05 You do not have any unjustified frag.
Someone is wrong... its say i've done unjustified frag but i dont get a frag lol


edit:
I can login over people characters... if someone is already login in the character, i want the person to not be able to get on it. clone = 0


edit::
I need an NPC to make private account... :O
 
Back
Top