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

Beer Bottles! to shank?

Joined
Jun 22, 2010
Messages
268
Solutions
1
Reaction score
5
Location
Usa, Utah
im using Aries 4.0
i have a beer bottle as a club i was wondering if it would be possible to make it always have beer in it, and when you drink it to display some sort of text :p il give rep++
 
we will see if cyko can x) always rep him hes pro o.o hes helped me a lot and I've only been active on this forum for like a week x)
if he cant do it i will believe it cant be done. yea high attack weapon :s but the servers balanced so i don;t mind ^^
 
ok i can do some funny things with this idea.

#1: i can make it if you drink the beer you get a message "you feel drunk and agressive, you smashed your beer bottle and are ready to attack!"
the bottle turns into a shank / "broken bottle" set as a weapon in items.xml
and then the shank / "broken bottle" will reset as a beer bottle again or you can leave it as the weapon(fun) :p

#2 you use the bottle and displays a message, the bottle stays the same with beer inside and its always a weapon

do you want it to give drunkenness?
 
Last edited:
ok use this in actions. (this might not work first time)

Lua:
<action itemid="2015" event="script" value="shank.lua"/>

shank.lua
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerLevel(cid) > 1 then --set the level you want to use the shank with--
                doTransformItem(uid,2024)
				doCreatureSay(cid, "You feel Drunk and agressive, you smashed your beer bottle are ready to Attack!", TALKTYPE_ORANGE_1)
local drunk = createConditionObject(CONDITION_DRUNK)
              setConditionParam(drunk, CONDITION_PARAM_TICKS, 60000)
              doAddCondition(cid, drunk)

        end
        return true
end

then go into items.xml and find

Lua:
<item id="2024" article="a" name="broken brown glass">
		<attribute key="weight" value="100"/>
	</item>
and set this as your weapon.

now you can either add this to make the weapon automatically turn back into the beer bottle

Lua:
<attribute key="decayTo" value="2015"/>
<attribute key="duration" value="7220"/>

try this system if this doesnt work to well i have another idea.
 
Last edited:
LOL here I think this will work:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 1 then --set the level you want to use the shank with--
        doTransformItem(uid,2024)
        doCreatureSay(cid, "You feel Drunk and agressive, you smashed your beer bottle are ready to Attack!", TALKTYPE_ORANGE_1)
        local drunk = createConditionObject(CONDITION_DRUNK)
		setConditionParam(drunk, CONDITION_PARAM_TICKS, 60*1000)
		doAddCondition(cid, drunk)
    end
return true
end
 
First post Re-Edited shank.xml
local drunk = createConditionObject(CONDITION_DRUNK)


should work now cyko? :)


ah 375311 beat me to it ^^

but i dont think you need "doAddCondition(cid, drunk)"
 
I've kinda fixed it can turn into the shank and back to beer bottle, says text but doesn't make you drunk so I'll post everything w/o that maybe someone can fix it:> its just like my magic light wand script that i have as a wand.

Lua:
<action itemid="2015" script="shank.lua" />
<action itemid="2024" script="shank2.lua" />

shank.lua
Lua:
function onUse(cid, item, frompos, item2, topos)

	doPlayerSay(cid,"You feel Drunk and agressive, you smashed your beer bottle are ready to Attack!",16)
	doTransformItem(item.uid,item.itemid+9)
	return 1

end

shank2.lua
Lua:
function onUse(cid, item, frompos, item2, topos)

	doPlayerSay(cid,"Ugh my Head!! BEEEER! ",16)
	doTransformItem(item.uid,item.itemid-9)
	return 1

end
 
Last edited:
nice work, it should have turned back into the bottle with the decayto on items.xml

then once it turns back it should do the same effects as its reset to the original script itemid

but glad you got it working il rep you for finishing the script :)
have fun with it.
 
here try this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local drunk = createConditionObject(CONDITION_DRUNK)
			setConditionParam(drunk, CONDITION_PARAM_TICKS, 60*1000)	
	if getPlayerLevel(cid) > 1 then --set the level you want to use the shank with--
        doSendAnimatedText(getCreaturePosition(cid), "Gulp", 192)
		doTransformItem(item.uid, 2024)
        doCreatureSay(cid, "WHO THE F*** WANT'S A PIECE OF ME!?", TALKTYPE_ORANGE_1)
		doSendAnimatedText(getCreaturePosition(cid), "SMASH", 192)
		doAddCondition(cid, drunk)
    end
return true
end
 
Back
Top