Register for your free account! | Forgot your password?

You last visited: Today at 08:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



following mounts lua

Discussion on following mounts lua within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
following mounts lua

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 
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
BizepsSupportAccount is offline  
Thanks
1 User
Old   #2
 
Calumon's Avatar
 
elite*gold: 100
Join Date: Aug 2009
Posts: 103
Received Thanks: 9
wrong section
Calumon is offline  
Old   #3
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
Quote:
Originally Posted by Calumon View Post
wrong section
ops, i dont know why i posted it here. sorry

#moverequest
BizepsSupportAccount is offline  
Old   #4
 
gerald500's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 1,049
Received Thanks: 275
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.
gerald500 is offline  
Thanks
1 User
Old   #5
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
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.
@: 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.)
BizepsSupportAccount is offline  
Old   #6

 
Ocelot2606's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 4,086
Received Thanks: 3,786
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?
Ocelot2606 is offline  
Old   #7
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
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.
BizepsSupportAccount is offline  
Old   #8
 
FetteRatte.'s Avatar
 
elite*gold: 285
Join Date: Sep 2016
Posts: 148
Received Thanks: 208
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
FetteRatte. is offline  
Old   #9

 
Jinbei's Avatar
 
elite*gold: 101
Join Date: Mar 2013
Posts: 13,366
Received Thanks: 2,748
Arrow Metin2 PServer - Discussions / Questions -> Metin2 PServer Gu…

#moved
Jinbei is offline  
Thanks
1 User
Old   #10
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
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.
BizepsSupportAccount is offline  
Old   #11
 
elite*gold: 0
Join Date: Sep 2012
Posts: 184
Received Thanks: 20
es funktioniert zwar aber die mounts failen richtig beim laufen, richtig pet like^^
Chris9090909090 is offline  
Old   #12
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,018
Received Thanks: 500
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.
BizepsSupportAccount is offline  
Old   #13
 
elite*gold: 0
Join Date: Sep 2012
Posts: 184
Received Thanks: 20
wenn es das von dev ist genau das selbe pet like
Chris9090909090 is offline  
Reply


Similar Threads Similar Threads
[Realase]Décripteur de fichier lua ressource 7.3 /Décripteur resource file lua 7.3
04/08/2012 - Rappelz Private Server - 5 Replies
Closed
Sehr weit geführte locale_.lua (locale_big5.lua)
08/02/2010 - Metin2 PServer Guides & Strategies - 50 Replies
Abend^^ Habe hier mal selber eine locale_.lua übersetzt! Ich habe mich von anderen localen inspirieren lassen habe sie aber bis auf 6 Zeilen selber geschrieben!! Ich werde sie, wenn ihr mir sagt welche quests die von zeile 300 - 900 sind, noch vervollständigen aber erstes Ziel... Website mit allen Quests zum Ansehen und einzelnen Download! Hoffe konnte euch weiterhelfen! Locale_.lua + skill_group.quest damit auch die Lehrer deutsch sind! Updatestand: 22.01.2010 Version 1: locale_.lua...



All times are GMT +2. The time now is 08:08.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.