following mounts lua

11/08/2017 17:18 BizepsSupportAccount#1
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 VNUMMOB_VNUM, DEFAULT NAMEbuff_idxspawn_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(mountVnumthen
                    
if spawn_effect_file_name != nil then
                        pet
.spawn_effect (mountVnumspawn_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(mountVnummountNamefalse)
                        
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 
Quote:
Originally Posted by #Metho View Post
STR + G ist bereits belegt

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
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:
            # ...
            
event.QuestButtonClick()
        else:
            if 
self.ShowNameFlag:
                
self.interface.ToggleGuildWindow()
            else:
                
app.PitchCamera(app.CAMERA_TO_POSITIVE
if i manage to implement python part i'll release it too i know its nothing special but lot of people search for it. :P
11/08/2017 17:23 Calumon#2
wrong section
11/08/2017 17:26 BizepsSupportAccount#3
Quote:
Originally Posted by Calumon View Post
wrong section
ops, i dont know why i posted it here. sorry

#moverequest
11/08/2017 22:52 gerald500#4
sieht doch gut aus nur nur null gibt es doch in lua nicht ? das heißt nil dort

und solche sachen "if true == pet.is_summon(mountVnum) then" kann man einfach in
"if pet.is_summon(mountVnum) then" ändern find ich schöner hat aber auch nix mit lua zu tun.
11/09/2017 15:16 BizepsSupportAccount#5
Quote:
Originally Posted by gerald500 View Post
sieht doch gut aus nur nur null gibt es doch in lua nicht ? das heißt nil dort

und solche sachen "if true == pet.is_summon(mountVnum) then" kann man einfach in
"if pet.is_summon(mountVnum) then" ändern find ich schöner hat aber auch nix mit lua zu tun.

danke für die verbesserung, war auch einer der einzigen gründe warum ich sie hier gepostet habe, ich möchte demnächst anfangen lua zu lernen.
@[Only registered and activated users can see links. Click Here To Register...]: Sobald ich Zeit habe poste ich hier auch den fix das man gleichzeitig reiten und Pet's rufen kann in ner anderen Quest (Das liegt daran das zweimal die pet.summon Funktion ausgeführt wird.)
11/09/2017 15:36 Ocelot2606#6
Warum nicht eifnach ich mein is jetzt nur so ein Gedanke die questfuntion erweitern also eine neue erstellen?

Wäre doch viel einfacher als das hier per quest zu lösen finde ich zumindest?
11/09/2017 15:58 BizepsSupportAccount#7
Quote:
Originally Posted by Ocelot2606 View Post
Warum nicht eifnach ich mein is jetzt nur so ein Gedanke die questfuntion erweitern also eine neue erstellen?

Wäre doch viel einfacher als das hier per quest zu lösen finde ich zumindest?

Meinst du über dem Source? Wäre natürlich viel einfacher ja dachte mir nur kann jemand gebrauchen aber ohne den Python Part wird man wohl mit dem release nix anfangen können, aber jmd. der Python kann, kann ja hier mal kurz helfen mit dem Strg + G absteigen / Aufsteigen.
11/11/2017 16:55 FetteRatte.#8
macht gar keinen sinn dass du mounts als pets machst wieso machst du nicht mounts einfach als pferdelevel
pferdelevel auf 40 erweitern und pferdelevel 31 weisser löwe
11/12/2017 11:14 Jinbei#9
#moved
11/12/2017 13:32 BizepsSupportAccount#10
Quote:
Originally Posted by Jinbei View Post
#moved
warum wurde der thread eigentlich 2mal gemoved?

xD war zuerst in pserver news anschließend discussions und nun guides.
11/15/2017 02:15 Chris9090909090#11
es funktioniert zwar aber die mounts failen richtig beim laufen, richtig pet like^^
11/15/2017 18:02 BizepsSupportAccount#12
Quote:
Originally Posted by Chris9090909090 View Post
es funktioniert zwar aber die mounts failen richtig beim laufen, richtig pet like^^
joa ist halt pet-system like, ich poste noch heute 2 interessante dinge in diesem thread, bzw editiere sie rein. das eine hab ich selbstgemacht das andere ist c++ mounts like horse von nem anderen forum was releast wurde.
11/15/2017 19:33 Chris9090909090#13
wenn es das von dev ist genau das selbe pet like