• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Mount Doll

Sebasbe

New Member
Joined
May 14, 2008
Messages
84
Reaction score
0
I made it for my server, i share with you

I choice item 9019, to change, just switch out the 9019's to your custom item id.

REP++

Tested on 0.4REV

PHP:
function onSay(cid, words, param)

local table = { 
    ["widow queen"] = {price = 0, id = 1}, 
    ["racing bird"] = {price = 0, id = 2}, 
    ["war bear"] = {price = 0, id = 3}, 
    ["black sheep"] = {price = 0, id = 4}, 
    ["midnight panther"] = {price = 0, id = 5}, 
    ["draptor"] = {price = 0, id = 6}, 
    ["titanica"] = {price = 0, id = 7}, 
    ["tin lizzard"] = {price = 0, id = 8}, 
    ["blazebringer"] = {price = 0, id = 9}, 
    ["rapid boar"] = {price = 0, id = 10}, 
    ["stampor"] = {price = 0, id = 11}, 
    ["undead cavebear"] = {price = 0, id = 12} 
}

    local msg = {"You have to choice one: widow queen,racing bird,war bear,black sheep,midnight panther,draptor,titanica,tin lizzard,blazebringer,rapid boar,stampor,undead cavebear", "You dont have Mount Doll..", "Not A Good Param..", "Full Mount Set sucesfully added..","You already got this mount"} 
    local param = string.lower(param) 
    local t = table[param] 


    if(getPlayerItemCount(cid, 9019) > 0) then 
        if(param ~= "" and t) then
		if t and not getPlayerMount(cid, t.id) then 
           	 	doPlayerRemoveItem(cid, 9019, 1)
           		 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
           	 	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
           	 	doPlayerAddMount(cid, t.id) 
		else
    			  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[5])
   		end
        else
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
        end
    else
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
 
end
 
Yeah, It's very good script, but I think You must create your unique syntax, becouse Your codes are not ordered:

-
Lua:
function onSay(cid, words, param)

local mounts = { 
    ["widow queen"] = {price = 0, id = 1}, 
    ["racing bird"] = {price = 0, id = 2}, 
    ["war bear"] = {price = 0, id = 3}, 
    ["black sheep"] = {price = 0, id = 4}, 
    ["midnight panther"] = {price = 0, id = 5}, 
    ["draptor"] = {price = 0, id = 6}, 
    ["titanica"] = {price = 0, id = 7}, 
    ["tin lizzard"] = {price = 0, id = 8}, 
    ["blazebringer"] = {price = 0, id = 9}, 
    ["rapid boar"] = {price = 0, id = 10}, 
    ["stampor"] = {price = 0, id = 11}, 
    ["undead cavebear"] = {price = 0, id = 12} 
}

    local msg = {"You have to choice one: widow queen,racing bird,war bear,black sheep,midnight panther,draptor,titanica,tin lizzard,blazebringer,rapid boar,stampor,undead cavebear", "You dont have Mount Doll..", "Not A Good Param..", "Full Mount Set sucesfully added..","You already got this mount"} 
    local param = string.lower(param) 
    local t = mounts[param] 

if(getPlayerItemCount(cid, 9019) > 0) then 
    if(param ~= "" and t) then
        if t and not getPlayerMount(cid, t.id) then 
                    doPlayerRemoveItem(cid, 9019, 1)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
                    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
                    doPlayerAddMount(cid, t.id) 
		    else
		    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[5])
		    end
		    else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
        end
	else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
end
 
Yeah, It's very good script, but I think You must create your unique syntax, becouse Your codes are not ordered:

-
Lua:
function onSay(cid, words, param)

local mounts = { 
    ["widow queen"] = {price = 0, id = 1}, 
    ["racing bird"] = {price = 0, id = 2}, 
    ["war bear"] = {price = 0, id = 3}, 
    ["black sheep"] = {price = 0, id = 4}, 
    ["midnight panther"] = {price = 0, id = 5}, 
    ["draptor"] = {price = 0, id = 6}, 
    ["titanica"] = {price = 0, id = 7}, 
    ["tin lizzard"] = {price = 0, id = 8}, 
    ["blazebringer"] = {price = 0, id = 9}, 
    ["rapid boar"] = {price = 0, id = 10}, 
    ["stampor"] = {price = 0, id = 11}, 
    ["undead cavebear"] = {price = 0, id = 12} 
}

    local msg = {"You have to choice one: widow queen,racing bird,war bear,black sheep,midnight panther,draptor,titanica,tin lizzard,blazebringer,rapid boar,stampor,undead cavebear", "You dont have Mount Doll..", "Not A Good Param..", "Full Mount Set sucesfully added..","You already got this mount"} 
    local param = string.lower(param) 
    local t = mounts[param] 

if(getPlayerItemCount(cid, 9019) > 0) then 
    if(param ~= "" and t) then
        if t and not getPlayerMount(cid, t.id) then 
                    doPlayerRemoveItem(cid, 9019, 1)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
                    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
                    doPlayerAddMount(cid, t.id) 
		    else
		    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[5])
		    end
		    else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
        end
	else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
end

You changed nothing except the some tabbing (which is still horrible) and renaming the table "Table" to "Mounts"????
 
Back
Top