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

Electric Chair Idea xD

Ceejzor

Murica Born N Raised!
Joined
Jul 5, 2008
Messages
2,305
Reaction score
198
Location
USA - Philippines
Ok so let me explain on my server I use the jail system instead of banning people. Because if I banned everyone who cavebots I would have no players :)

But here we go!

Jail!
1zr2ft0.jpg


As you can see in the top there is a chair and a switch. I'm hoping that when people are prisoned they can wait there time out or use the "Electric Chair".

What the "Electric Chair" will do is when the lever is pulled the subject on the chair will instantly die BUT they will lose 5% more then those that die normally. This will be the only way to escape the prison system. Besides waiting there time.

About the chair I don't want people to be able to get pushed on it.. I want them to have to step on it and kill themselves. you know?

Think it's possible? xD
 
...will instantly die BUT they will lose 5% more then those that die normally...
5% more? Anyways, he will die, so why 5% more? XD
-105% hp?

btw, here it is:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then

local health = -(getCreatureHealth(cid)+(getCreatureHealth(cid)*0.05))

	if item.itemid == 1945 or item.itemid == 1946 then
		doSendMagicEffect(getCreaturePosition(cid), 11)
		doCreatureAddHealth(cid, health)
	end
end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Last edited:
Nice idea... but i think if someone can make this
4 levers
1. 40% Form Hp
2. 65% form Hp & Mana
3. 75% form hp
4. 100% form hp
 
...will instantly die BUT they will lose 5% more then those that die normally...
5% more? Anyways, he will die, so why 5% more? XD
-105% hp?

btw, here it is:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then

local health = -(getCreatureHealth(cid)+(getCreatureHealth(cid)*0.05))

	if item.itemid == 1945 or item.itemid == 1946 then
		doSendMagicEffect(getCreaturePosition(cid), 11)
		doCreatureAddHealth(cid, health)
	end
end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end

for example on my server the death % is 10. I was hoping somehow when he kills himself using the electric chair he would lose 15% BECAUSE he is in jail anyway.

Only people who break the rule go to jail. and as soon as they leave jail what do you think they will probably do again? cavebot xD

but thanks for the script xampy *cough* LEGEND *cough*
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doSendMagicEffect(getThingPos(cid), CONST_ME_ENERGYHIT)
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 150)
		doCreatureRemoveHealth(cid, getCreatureHealth(cid))
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
for example on my server the death % is 10. I was hoping somehow when he kills himself using the electric chair he would lose 15% BECAUSE he is in jail anyway.

Only people who break the rule go to jail. and as soon as they leave jail what do you think they will probably do again? cavebot xD

but thanks for the script xampy *cough* LEGEND *cough*
Hehehe :p Thanks. Cykotitan was faster than me :(

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doSendMagicEffect(getThingPos(cid), CONST_ME_ENERGYHIT)
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 150)
		doCreatureRemoveHealth(cid, getCreatureHealth(cid))
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
You forgot >> if item.actionid == XXXX then <<.


So it will be:
LUA:
local loss =  getConfigValue('deathLostPercent')+5 -- (+5) = +5% of loss

function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then
        if item.itemid == 1945 or item.itemid == 1946 then
                doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
                doSendMagicEffect(getCreaturePosition(cid), 11)
                doCreatureAddHealth(cid, -getCreatureHealth(cid))
        end
end
        return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Last edited:
Maybe if you add events that took some life and sent energy area to the chair pos, so that it's like "torcher" instead of just one time death. It might be more fun. :)
 
"Cut your life short (and your jail time) by relaxing in the chair and pulling the lever."

Add the lil gravestone in front, and a tp to the > of it, that pushes you forward (^) so that no one can push you =) (can't push onto tp)

Sux edit, but you see what I mean xD?

4kfcli.png
 
The person who pulls it XD. So, must I make to check if he/she is on the chair?

Yes if ya don't mind and got some spare time :)

"Cut your life short (and your jail time) by relaxing in the chair and pulling the lever."

Add the lil gravestone in front, and a tp to the > of it, that pushes you forward (^) so that no one can push you =) (can't push onto tp)

Sux edit, but you see what I mean xD?

4kfcli.png

I like.. especially the electric look under the lever :)

PS. Is there anyway I can make it say for example.
Killed at level 100 by Old Sparky.
Instead of this.
Kinanyer died at level 256 by undefined.
 
LUA:
local loss =  getConfigValue('deathLostPercent')+5 -- (+5) = +5% of loss
local pos = { x = XXX, y = YYY, z = ZZZ }

function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then
	if item.itemid == 1945 or item.itemid == 1946 then
		if getPlayerPosition(cid) == pos then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
			doSendMagicEffect(getCreaturePosition(cid), 11)
			doCreatureAddHealth(cid, -getCreatureHealth(cid))
		end
	end
end
		return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Checks if the position is on the chair(gotta change XXX, YYY and ZZZ to the chair position). At least I think it work :P
Cyko's script just added getPlayerPosition

another script, you will die slowly(not tested, and I don't think it will work xD but Cyko or someone else can fix it:p)
LUA:
	local loss =  getConfigValue('deathLostPercent')+5 -- (+5) = +5% of loss
	local pos = { x = XXX, y = YYY, z = ZZZ }
	local effect = 11 -- the effect under yourself when using the chair


function dmg2()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+9)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end

function dmg3()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+8)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end

function dmg4()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+7)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end

function dmg5()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+6)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end

function dmg6()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+5)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end	

function dmg7()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+4)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end	

function dmg8()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+3)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end	


function dmg9()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+2)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end	


function dmg10()
	doCreatureAddHealth(cid, -getCreatureHealth(cid)+1)
	doSendMagicEffect(getCreaturePosition(cid), effect)
end	

function dmg11()
	doCreatureAddHealth(cid, -getCreatureHealth(cid))
	doSendMagicEffect(getCreaturePosition(cid), effect)
	doCreatureSetNoMove(cid, canMove)
end	
			
function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then
	if item.itemid == 1945 or item.itemid == 1946 then
		if getPlayerPosition(cid) == pos then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
			doSendMagicEffect(getCreaturePosition(cid), 11)
			doCreatureSetNoMove(cid, cannotMove)
			doCreatureSay(cid,'The Electric chair will kill you slowly. It will be over in 20 seconds.',TALKTYPE_ORANGE_1)
			doCreatureAddHealth(cid, -getCreatureHealth(cid)+10)
			addEvent(dmg2, 2 * 1000)
			addEvent(dmg3, 4 * 1000)
			addEvent(dmg4, 6 * 1000)
			addEvent(dmg5, 8 * 1000)
			addEvent(dmg6, 10 * 1000)
			addEvent(dmg7, 12 * 1000)
			addEvent(dmg8, 14 * 1000)
			addEvent(dmg9, 16 * 1000)
			addEvent(dmg10, 18 * 2000)
			addEvent(dmg11, 20 * 2000)
		end
	end
end
		return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Last edited:
LUA:
local loss =  getConfigValue('deathLostPercent')+5 -- (+5) = +5% of loss
local pos = { x = XXX, y = YYY, z = ZZZ }

function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.actionid == XXXX then
	if item.itemid == 1945 or item.itemid == 1946 then
		if getPlayerPosition(pos) then
			doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
			doSendMagicEffect(getCreaturePosition(cid), 11)
			doCreatureAddHealth(cid, -getCreatureHealth(cid))
		end
	end
end
		return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Checks if the position is on the chair(gotta change XXX, YYY and ZZZ to the chair position). At least I think it work :P
Cyko's script just added getPlayerPosition

Wouldn't work, should be something like:
Code:
if getCreaturePosition(cid).x == toPosition.x+1 and getCreaturePosition(cid).y == toPosition.y then
 
edited my post above Sypher, added 1 more script XD

EDIT; Sypher, would this work?
if getPlayerPosition(cid).x == pos.x and getPlayerPosition(cid).y == pos.y and getPlayerPosition(cid)z == pos.z then
added it instead in the scripts
 
Last edited:
Back
Top