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

Action Russian Roulette rune

gullfisk

- Hoster / Mapper -
Joined
Aug 2, 2008
Messages
64
Reaction score
0
Location
With my mother :D
Credits to Bazetts for making it.
I just edited it and made i work for 8.21. Dunno about other clients.
I bet most of you have heard the word russian roulette be4.. and this works just like
this..
You have a 16% chance to die and it's up to you how u wanna play it. Last man
standing gets a reward or w/e

russian.lua
PHP:
function onUse(cid, item, frompos, item2, topos)

	if item.type >= 6 then
		doRemoveItem(item.uid, 100)
		return -1
	end

 	n = math.random(1,6)
 	name = getPlayerName(cid)
	rem = getCreatureHealth(cid) + getPlayerMana(cid)
	if n <= item.type then
		doCreatureSay(cid, "This guy got OwN3D!", TALKTYPE_ORANGE_1)
		doCreatureAddHealth(cid, - rem)
	else
		doCreatureSay(cid, "You got lucky! ", TALKTYPE_ORANGE_1)
	end
	
	doRemoveItem(item.uid, 100)
	
	return 1
end

actions.xml
Code:
<action itemid="2307" script="other/russian.lua" />
change the itemid if u want..

spells.xml
Code:
<rune name="Russian Roulette" id="2307" allowfaruse="1" charges="1" lvl="50" maglv="1" exhaustion="3000" needtarget="1" blocktype="solid" script="custom/russian.lua"/>
 
Does'nt work on 8,22, cant find "OnSpellCast" Damn, this would of been fun to do :/
 
whats this cr*p, it just says "you got lucky every time", damn im not that lucky just did it about 50 times and never died o_O

nvm it was cuz u have to equip to rune to use
 
It seems nice, however I can't see any use for this line.
name = getPlayerName(cid)
 
what he were thinking, i guess, was to use it like this:


PHP:
function onUse(cid, item, frompos, item2, topos) 

    if item.type >= 6 then 
        doRemoveItem(item.uid, 100) 
        return -1 
    end 

     n = math.random(1,6) 
     name = getPlayerName(cid) 
    rem = getCreatureHealth(cid) + getPlayerMana(cid) 
    if n <= item.type then 
        doCreatureSay(cid, "'..getCreatureName(cid)..' got OwN3D!", TALKTYPE_ORANGE_1) 
        doCreatureAddHealth(cid, - rem) 
    else 
        doCreatureSay(cid, "You got lucky! ", TALKTYPE_ORANGE_1) 
    end 
     
    doRemoveItem(item.uid, 100) 
     
    return 1 
end

not tested with creature say, but works on broadcast msgs
 
what he were thinking, i guess, was to use it like this:


PHP:
function onUse(cid, item, frompos, item2, topos) 

    if item.type >= 6 then 
        doRemoveItem(item.uid, 100) 
        return -1 
    end 

     n = math.random(1,6) 
     name = getPlayerName(cid) 
    rem = getCreatureHealth(cid) + getPlayerMana(cid) 
    if n <= item.type then 
        doCreatureSay(cid, "'..getCreatureName(cid)..' got OwN3D!", TALKTYPE_ORANGE_1) 
        doCreatureAddHealth(cid, - rem) 
    else 
        doCreatureSay(cid, "You got lucky! ", TALKTYPE_ORANGE_1) 
    end 
     
    doRemoveItem(item.uid, 100) 
     
    return 1 
end

not tested with creature say, but works on broadcast msgs

With yours the "name" is still not used x).

Also, with your re-make it will say " >YOUR NAME HERE< got owned " 8D
 
PHP:
doCreatureSay(cid, "'..getCreatureName(cid)..' got OwN3D!", TALKTYPE_ORANGE_1)
That would of have printed
'..getCreatureName(cid)..' got OwN3D!
PHP:
doCreatureSay(cid, getCreatureName(cid) .. " got OwN3D!", TALKTYPE_ORANGE_1)
However, this piece would print the name got OwN3D!.
or to satisfy Marcinek~ x)
PHP:
doCreatureSay(cid, name .. " got OwN3D!", TALKTYPE_ORANGE_1)

haha, just being sticky, however I get your point. ;)
 
PHP:
doCreatureSay(cid, "'..getCreatureName(cid)..' got OwN3D!", TALKTYPE_ORANGE_1)
That would of have printed
'..getCreatureName(cid)..' got OwN3D!

PHP:
doCreatureSay(cid, getCreatureName(cid) .. " got OwN3D!", TALKTYPE_ORANGE_1)
However, this piece would print the name got OwN3D!.
or to satisfy Marcinek~ x)
PHP:
doCreatureSay(cid, name .. " got OwN3D!", TALKTYPE_ORANGE_1)

haha, just being sticky, however I get your point. ;)

It wouldnt. =o
 
Really? I thought it was like in PHP, my apologizes then!
 
In PHP I guess you also can do:

echo ''.$something.' lalala';

cant you? ^^

kinda offtopic =(
 
Here's an idea for you. Make it a rotatable item and make it a use command and when you use it, it rotates on its own anywhere from once to like 8 times and whichever way it faces when it stops gets a big energy beam to the face :eek:
 
Back
Top