Page 1 of 1
Get Mounted II (the sequeal)
Posted: Mon Sep 18, 2017 10:51 am
by Ememjr
so way back when Gangrenous was getting his NPC's mounted, after seeing how exciting it was i have decided to Get Mounted myself.
but apparently i just dont have it anymore and need help.
I have set item # 47476 as usable, so when i right click it i can use it, i have also issigned a script to the item, i made it very sipmple for now, once i get it working, i will add more to dismount if already mounted, etc.
so when i right click the item and select use. nothing appears to happen, i debug it and it doe show the script executeing and the setmount funtion executing, and then i get lost and get timed out on client during my stepping,
what am i missing, should i select a different model id?
Code: Select all
--[[
Script Name : ItemScripts/GenericMount.lua
Script Purpose : Use a mount
Script Author : Ememjr
Script Date : 9/18/2017
Script Notes : Halasian Draft Horse item id's 46615,46616
use will mount/dismount
examine has option to convert to house item
--]]
function used(Item, Player)
SetMount(Player, 6828)
end
Re: Get Mounted II (the sequeal)
Posted: Mon Sep 18, 2017 4:34 pm
by Ememjr
i need a place to store the equipmount and appearance mount that you see in character screen /mounts
i am thinking to add 3 columns to the character details
1. mount equip slot (index from mount list)
2. mount appearance slot (index from mount list)
3. current mount (only if we are not already storing peristant buffs that persist through log out ( since the horse is a buff (spell)
the thing i am unsure of is where to store in in the player, i am guessing info_struct but i could not find it
Re: Get Mounted II (the sequeal)
Posted: Mon Sep 18, 2017 4:35 pm
by Ememjr
i did get mounts to show up in the mounts tab though
mounts.JPG
Re: Get Mounted II (the sequeal)
Posted: Mon Sep 18, 2017 5:01 pm
by Jabantiz
If the ID is not a valid mount I do not think it will show at all, we really should get a list of valid mount model id's. Another common issue is that mounts are toggled off in options on the character sheet, I have had that several times and wasted a lot of time trying to figure out why mounts didn't show...
character_details would probably be a good table to store this info, the current mount should probably be left off and handled in the maintained buffs whenever that is added though. This will also mean you will need to change the item scripts to cast a spell in the future.
info, vis, and pos structs are shared across all spawns, specifically they relate to the xml structs in the packets that are required for all spawns. As this is a player only thing it shouldn't be added to those structs and will be fine as just normal variables in the player class.
Re: Get Mounted II (the sequeal)
Posted: Mon Sep 18, 2017 5:33 pm
by Ememjr
i believe you may hit the nail on the head with the mounts turned off in options i will test that later tonight
yep my mounts were set to never display in OPtions
Re: Get Mounted II (the sequeal)
Posted: Tue Sep 19, 2017 4:10 am
by Ememjr
ok I can now get mounted, but it seems that when on live and you sommon a mount it goes to the spell effects windows as well
are we going to need to add all the mounts to spells in order to summon them and for them to use there effects properly, or is there another way to do this
* i should be able to post the struct and code changes to the forums tonight
Re: Get Mounted II (the sequeal)
Posted: Tue Sep 19, 2017 12:39 pm
by Jabantiz
It will have to be a spell per mount for the players.
Re: Get Mounted II (the sequeal)
Posted: Tue Sep 19, 2017 12:42 pm
by Ememjr
that uderstood, but can it be a spell they can not see or cast directly ie, would never show in spell window, when they press K
Re: Get Mounted II (the sequeal)
Posted: Tue Sep 19, 2017 12:47 pm
by Jabantiz
yea, as long as they aren't given the spell via spell_classes or from a scroll it will never show up in the knowledge book, it can still be cast from items though.
Re: Get Mounted II (the sequeal)
Posted: Tue Sep 19, 2017 1:14 pm
by Ememjr
that what i want , since it should be able to be cast from item as well, if the mount is in there inventory