i've done it on my self, and i have absoloutly 0 knowledge about lua but i do think that this release can help few players, the quest part should've be done, there is a quote from an user about the python part at the end of my release. since my friend will code the c++ part, i wont need this i just did it because i was bored. as you can see it's the pet_system.quest from gameforge quests
PHP Code:
quest mount_system begin
state start begin
function get_mount_info(itemVnum)
mount_info_map = {
-- [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx
[71124] = { 20114, "'s Weißer Löwe", 0},
[71125] = { 20115, "'s Kriegskeiler", 0},
[71126] = { 20116, "'s Streitwolf", 0},
[71127] = { 20117, "'s Sturmtiger", 0},
[71128] = { 20118, "'s Schlachtenlöwe", 0},
}
itemVnum = tonumber(itemVnum)
return mount_info_map[itemVnum]
end
--reittier_state requires few implementations in source
when login with pc.getqf("mount_vnum") != 0 begin
item.select(pc.getqf("mount_item_id"))
pet.summon(pc.getqf("mount_vnum"), "'s Reittier", false)
end
when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use begin
local mount_info = mount_system.get_mount_info(item.vnum)
pc.setqf("mount_item_id", item.get_id()) -- neu
if null != mount_info then
local mountVnum = mount_info[1]
local mountName = mount_info[2]
if true == pet.is_summon(mountVnum) then
if spawn_effect_file_name != nil then
pet.spawn_effect (mountVnum, spawn_effect_file_name)
end
pet.unsummon(mountVnum)
pc.setqf("mount_vnum", 0)
syschat("Du hast dein Haustier weggeschickt.")
else
if pet.count_summoned() < 1 then
pet.summon(mountVnum, mountName, false)
pc.setqf("mount_vnum", mountVnum)
end
end -- if pet.is_summon
end -- if null != mount_info
end
when 20114.click or 20115.click or 20116.click or 20117.click or 20118.click begin
local mount_info = mount_system.get_mount_info(item.vnum)
local mountVnum = mount_info[1]
pc.mount(mountVnum)
pet.unsummon(mountVnum)
if false == pc.is_riding() then
pet.summon(mountVnum)
pc.unmount(mountVnum)
end
end -- state
end -- quest
end
if i manage to implement python part i'll release it too i know its nothing special but lot of people search for it. :PQuote:
STR + G ist bereits belegt
Aber du kannst es ja abändern:PHP Code:def __PressGKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/ride")
else:
if self.ShowNameFlag:
self.interface.ToggleGuildWindow()
else:
app.PitchCamera(app.CAMERA_TO_POSITIVE)
PHP Code:def __PressGKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
# net.SendChatPacket("/ride")
# else:
# ...
event.QuestButtonClick()
else:
if self.ShowNameFlag:
self.interface.ToggleGuildWindow()
else:
app.PitchCamera(app.CAMERA_TO_POSITIVE)