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

[Request] Mount Selling Npc

Solarium

New Member
Joined
Jul 18, 2009
Messages
30
Reaction score
0
Hello, Im a noob at scripting and i tried to edit a simple npc to sell mounts but it failed i kept getting an error i couldnt figure out so ive come here to ask if someone could make me an npc that sells mounts to players please, here is the list of mounts i have in my server:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mounts>
	<mount id="1" clientid="368" name="Widow Queen" speed="20" premium="yes" />
	<mount id="2" clientid="369" name="Racing Bird" speed="20" premium="yes" />
	<mount id="3" clientid="370" name="War Bear" speed="300" premium="yes" />
	<mount id="4" clientid="371" name="Black Sheep" speed="20" premium="yes" />
	<mount id="5" clientid="372" name="Midnight Panther" speed="300" premium="yes" />
	<mount id="6" clientid="373" name="Draptor" speed="20" premium="yes" />
	<mount id="7" clientid="374" name="Titanica" speed="20" premium="yes" />
	<mount id="8" clientid="375" name="Tin Lizzard" speed="55" premium="yes" />
	<mount id="9" clientid="376" name="Blazebringer" speed="350" premium="yes" />
	<mount id="10" clientid="377" name="Rapid Boar" speed="20" premium="yes" />
	<mount id="11" clientid="378" name="Stampor" speed="20" premium="yes" />
	<mount id="12" clientid="379" name="Undead Cavebear" speed="300" premium="yes" />
	<mount id="13" clientid="387" name="Donkey" speed="20" premium="yes" />
	<mount id="14" clientid="388" name="Tiger Slug" speed="20" premium="yes" />
	<mount id="15" clientid="389" name="Uniwheel" speed="20" premium="yes" />
	<mount id="16" clientid="390" name="Crystal Wolf" speed="20" premium="yes" />
	<mount id="17" clientid="392" name="Brown War Horse" speed="20" premium="yes" />
	<mount id="18" clientid="401" name="Kingly Deer" speed="20" premium="yes" />
	<mount id="19" clientid="402" name="Tamed Panda" speed="20" premium="yes" />
	<mount id="20" clientid="405" name="Dromedary" speed="20" premium="yes" />
	<mount id="21" clientid="406" name="Sandstone Scorpion" speed="20" premium="yes" />
	<mount id="22" clientid="421" name="Rented Horse" speed="20" premium="no" />
	<mount id="23" clientid="426" name="Fire War Horse" speed="20" premium="yes" />
	<mount id="24" clientid="427" name="Shadow Draptor" speed="20" premium="yes" />
	<mount id="25" clientid="437" name="Rented Horse" speed="20" premium="no" />
	<mount id="26" clientid="438" name="Rented Horse" speed="20" premium="no" />
	<mount id="27" clientid="447" name="Ladybug" speed="20" premium="yes" />
	<mount id="28" clientid="450" name="Manta" speed="20" premium="yes" />
</mounts>

If someone could help me that would be AMAZING!!!!, thank you :)
 
thats the one i had, but when i tried to edit it to sell the extra new mounts i now have cause i updated to 9.54 the npc didnt work so i need a new one :(
 
ok so i tried that script before even trying to add the two extra mounts, but the server wont even summon the npc, when i try to spawn the npc it just tells me it cant open the .lua and that it doesnt exsist, but i can see it clear as day and i even checked the spelling and all the letters match fine

- - - Updated - - -

ok i got it working, i just deleted it and redid it, but now its giving me this error

Code:
'}' expected <to close '{' at line 1> near '['
 
I took a look at this script http://otland.net/f83/mount-npc-w-mounts-lua-script-146767/

Code:
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} 
    ["Mule"] = {price = 0, id = 13}
    ["Tiger Slug"] = {price = 0, id = 14}
    ["Uniwheel"] = {price = 0, id = 15}
    ["Crystal Wolf"] = {price = 0, id = 16}
    ["War Horse"] = {price = 0, id = 17}
    ["Kingly Deer"] = {price = 0, id = 18}
    ["Tamed Panda"] = {price = 0, id = 19}
    ["Dramedary"] = {price = 0, id = 20}
    ["Sandstone Scorion"] = {price = 0, id = 21}
    ["Rented Horse 1"] = {price = 0, id = 22}
    ["Fire War Horse"] = {price = 0, id = 23}
    ["Shadow Draptor"] = {price = 0, id = 24}
    ["Rented Horse 2"] = {price = 0, id = 25}
    ["Rented Horse 3"] = {price = 0, id = 26}
}

It needs comma at the end of each line

Code:
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}, 
    ["Mule"] = {price = 0, id = 13},
    ["Tiger Slug"] = {price = 0, id = 14},
    ["Uniwheel"] = {price = 0, id = 15},
    ["Crystal Wolf"] = {price = 0, id = 16},
    ["War Horse"] = {price = 0, id = 17},
    ["Kingly Deer"] = {price = 0, id = 18},
    ["Tamed Panda"] = {price = 0, id = 19},
    ["Dramedary"] = {price = 0, id = 20},
    ["Sandstone Scorion"] = {price = 0, id = 21},
    ["Rented Horse 1"] = {price = 0, id = 22},
    ["Fire War Horse"] = {price = 0, id = 23},
    ["Shadow Draptor"] = {price = 0, id = 24},
    ["Rented Horse 2"] = {price = 0, id = 25},
    ["Rented Horse 3"] = {price = 0, id = 26},
}
 
Back
Top