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

Monster Doll! Rep ++

Ekt

New Member
Joined
Sep 11, 2011
Messages
58
Reaction score
0
Location
127.0.0.1
Hello I have this script

Lua:
local waittime =  2 --Default (30 seconds)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (1000 * waittime))
monsters = {"Orc Rider", "Orc Marauder", "Serpent Spawn"}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if hasCondition(cid, CONDITION_EXHAUST) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must mount every 2 Seconds")
	return TRUE
end	

get = monsters[math.random(1, #monsters)]
	if (getPlayerItemCount(cid, 9019) > 0) then
		doSetMonsterOutfit(cid, get, -1)
        doPlayerSendTextMessage(cid, 25, "You are mounted!")
		 doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		doAddCondition(cid, exhaust)
	end	
	return true
end

I want to edit this script in this way:

When use make visible to all people a text saying You are Mounted!
If you use the doll once you will transform into a monster, if you use it again you will convert into human if you use it again in a monster etc...
when you are mounted make the speed of the player increase +30

Thanks I will appreciate if you can do this script for me. I will rep+++

Ekt
 
Code:
doPlayerSendTextMessage(cid, 25, "You are mounted!")

to

Code:
doCreatureSay(cid, "You are Mounted!", TALKTYPE_MONSTER)

Also, add:

Code:
doChangeSpeed(cid, 30)
for +30 speed
That's all I've got. I'm not a scripter.

Red
 
I'm not a scripter either but I'll correct your english a little bit.
Change
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must mount every 2 Seconds")
to
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You can only mount every 2 seconds!")
 
Untested, I know there may be an issue while reverting back the outfit though, since I haven't used this function a lot to know what exactly it returns:

Code:
local checkstate = 55151 --- Storage value
local waittime = 2 --Default (30 seconds)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (1000 * waittime))
monsters = {"Orc Rider", "Orc Marauder", "Serpent Spawn"}


function onUse(cid, item, fromPosition, itemEx, toPosition)
local curoutfit = getCreatureOutfit(cid)
if hasCondition(cid, CONDITION_EXHAUST) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You can use this item only every 2 seconds.")
	return TRUE
end	

get = monsters[math.random(1, #monsters)]

	if (getPlayerItemCount(cid, 9019) > 0) then
		if getPlayerStorageValue(cid,checkstate) ~= 1 then 
		doSetMonsterOutfit(cid, get, -1)
        doPlayerSendTextMessage(cid, 25, "You are mounted!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
		doAddCondition(cid, exhaust)
		doChangeSpeed(cid, 30)
		setPlayerStorageValue(cid, checkstate, 1) 
		else
		doSetMonsterOutfit(cid, curoutfit, -1)
        doPlayerSendTextMessage(cid, 25, "You are dismounted!")
		doSendMagicEffect(getCreaturePosition(cid), 2)
		doAddCondition(cid, exhaust)
		doChangeSpeed(cid, -30)
		setPlayerStorageValue(cid, checkstate, 0)
		end
	end	
	return true
end
 
Back
Top