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

Mount

conter1

New Member
Joined
Feb 19, 2010
Messages
19
Reaction score
0
Can someone help me change this script so you don´t have to do the quest. You just write !mount and and the outfit changes to an orc rider and speed to 500 and when you write !mount again you transform back to normal outfit. And you can use !mount how much you want. :D


PHP:
function onSay(cid, words, param, channel)
	local againHour = 6 -- How many hours until they can use it again
	local speedAdd = 500 -- How much speed that should be added
	local outfit = 30 -- How many minutes they're faster and has the mount outfit
	local player = getPlayerGUID(cid)
 
	if getPlayerStorageValue(cid, 13000) == 1 then 
		if getPlayerStorageValue(cid, 13001) <= 0 then
			doSetCreatureOutfit(cid, {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, outfit*60*1000)
			setPlayerStorageValue(cid, 13001, 1)
			addEvent(setPlayerStorageValue, againHour*60*60*1000, cid, 13001, 0)
			addEvent(doChangeSpeed, outfit*60*1000, cid, -speedAdd)
			addEvent(db.executeQuery, againHour*60*60*1000, "UPDATE `player_storage` SET `value` = 0 WHERE `player_id` = " .. player .. " AND `key` = 13001;")
			doChangeSpeed(cid, speedAdd)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
		else
		doPlayerSendCancel(cid, "You can only use this command every 6 hours.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You haven't done the Orc Rider Quest!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
return true
end

I´ll Rep ++ :)
 
Lua:
function onSay(cid, words, param, channel) 
    local againHour = 6 -- How many hours until they can use it again 
    local speedAdd = 500 -- How much speed that should be added 
    local outfit = 30 -- How many minutes they're faster and has the mount outfit 
    local player = getPlayerGUID(cid) 
  
   
        if getPlayerStorageValue(cid, 13001) <= 0 then 
            doSetCreatureOutfit(cid, {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, outfit*60*1000) 
            setPlayerStorageValue(cid, 13001, 1) 
            addEvent(setPlayerStorageValue, againHour*60*60*1000, cid, 13001, 0) 
            addEvent(doChangeSpeed, outfit*60*1000, cid, -speedAdd) 
            addEvent(db.executeQuery, againHour*60*60*1000, "UPDATE `player_storage` SET `value` = 0 WHERE `player_id` = " .. player .. " AND `key` = 13001;") 
            doChangeSpeed(cid, speedAdd) 
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) 
        else 
            doPlayerSendCancel(cid, "You can only use this command every 6 hours.") 
             doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
        end 
  
return true 
end
 
i was talking about your script xD that the script was right and nothing wrong. Thats why i sayd "Everything look fine for me o_O"
 
Lua:
function onSay(cid, words, param, channel) 
    local againHour = 6 -- How many hours until they can use it again 
    local speedAdd = 500 -- How much speed that should be added 
    local outfit = 30 -- How many minutes they're faster and has the mount outfit 
    local player = getPlayerGUID(cid) 
  
   
        if getPlayerStorageValue(cid, 13001) <= 0 then 
            doSetCreatureOutfit(cid, {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, outfit*60*1000) 
            setPlayerStorageValue(cid, 13001, 1) 
            addEvent(setPlayerStorageValue, againHour*60*60*1000, cid, 13001, 0) 
            addEvent(doChangeSpeed, outfit*60*1000, cid, -speedAdd) 
            addEvent(db.executeQuery, againHour*60*60*1000, "UPDATE `player_storage` SET `value` = 0 WHERE `player_id` = " .. player .. " AND `key` = 13001;") 
            doChangeSpeed(cid, speedAdd) 
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) 
        else 
            doPlayerSendCancel(cid, "You can only use this command every 6 hours.") 
             doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
        end 
  
return true 
end

Thanks, but please remove the time limit 6hour and 30min (limit). And please make so when you write !mount again you transform back to normal... THANKS!!!! :)
 
Back
Top