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

[MOD] Ostra MOD

azzkaban

Monster Maker
Joined
Feb 23, 2010
Messages
1,101
Reaction score
194
Location
Iquique Chile
OstraMOD_zps575d096d.png


XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Ostra MOD" version="1.0" author="Amy Azzkaban" contact="blacktibia.org/otland.net" enabled="yes">
	<action itemid="7553" event="script" override="yes"><![CDATA[
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 7553 then
doTransformItem(item.uid,7552)
doPlayerAddItem(cid,2143,1)
doDecayItem(item.uid)
doTargetCombatHealth(0, cid, COMBAT_POISONDAMAGE, -30, -70, CONST_ME_POFF)
doCreatureSay(cid, "Aaahh WTF", TALKTYPE_YELL)
end
return 1 
end
	]]></action>
</mod>
 
Last edited:
XML:
	<item id="2143" article="a" name="white pearl" plural="white pearls">
		<attribute key="weight" value="20" />
	</item>
	<item id="2144" article="a" name="black pearl" plural="black pearls">
		<attribute key="weight" value="20" />
	</item>
use those :p
 
XML:
	<item id="2143" article="a" name="white pearl" plural="white pearls">
		<attribute key="weight" value="20" />
	</item>
	<item id="2144" article="a" name="black pearl" plural="black pearls">
		<attribute key="weight" value="20" />
	</item>
use those :p

Yes! I need match random, I'm new in scripts :D
 
I playd real tibia and had a chance to see how it works myself.
You've inspired me to write it. Adding random pearl in one line instead of 6 by @up(Erikas)
Time is stored in seconds, 24359 is storage, 86400 seconds means one per day.

Here is my variant accurate to real tibia(different in chances only):
(any name.xml in mods folder):
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="RL Seashell" version="1.0" author="Zbizu" contact="otland profile" enabled="yes">
<action itemid="7552" event="script" override="yes"><![CDATA[
local delay = {
		[1] = 24359,
		[2] = 86400 -- time
	}

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

if getPlayerStorageValue(cid,delay[1]) > os.time() then
doCreatureSay(cid, "You have already opened the shell today.", TALKTYPE_ORANGE_1)
doPlayerSendCancel(cid,"You are exhausted (".. getPlayerStorageValue(cid,delay[1])-os.time() .." seconds).")
else
local random = math.random(1,100)
doSendMagicEffect(getThingPos(item.uid), 25)
doTransformItem(item.uid,7553)
	if random >= 70 then
		doPlayerAddItem(cid, math.random(7632, 7633),1)
		doCreatureSay(cid, "You have found a beautiful pearl.", TALKTYPE_ORANGE_1)
	else
	if random < 40 then
		doCreatureSay(cid, "Nothing is inside.", TALKTYPE_ORANGE_1)
	else
		doCreatureSay(cid, "Ouch! You squeezed your fingers.", TALKTYPE_ORANGE_1)
		doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -200, -200, 0)
	end
	end
doDecayItem(item.uid)
setPlayerStorageValue(cid,delay[1],os.time()+delay[2])
end
return 1 
end
	]]></action>
</mod>
 
Last edited:
I bet it's simple to remake it in actions for you
we're in mods section and this is thread with another mod therefore I've pasted my variant in mod version.
 
why mod if it's only 1 actionscript xd
 
Back
Top