Register for your free account! | Forgot your password?

You last visited: Today at 22:30

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

 

Quest Problem

Reply
 
Old   #1
 
elite*gold: 25
Join Date: Jun 2011
Posts: 1,611
Received Thanks: 351
Quest Problem

Moin,

ich schreibe grad eine Quest die mit dem Item 70036 versucht Skills von M1 auf G1 zu lesen pro Stufe muss man 70036 benutzen. Sozusagen wie ein Seelenstein bloß für die M1 skills und ohne das Rangpunkte abgezogen werden.

die Quest:

PHP Code:
quest training_grandmaster_skill begin
    state start begin
        when 70036.
use begin
            say_title
("Notiz")
            if 
pc.get_skill_group() == 0 then
                say
("Du besitzt keine Fertigkeiten, die")
                
say("gemeistert werden können.")
                return
            
end
            
if get_time() < pc.getqf("next_time"then -- and not is_test_server() then
                
if pc.is_skill_book_no_delay() then
                    say
("Durch den gebrauch einer Exorzismuss-")
                    
say("Schriftrolle kannst du einen weiteren")
                    
say("Skill lesen!")                
                    
wait()
                    
say_title("Notiz")
                else
                    
say("Du hast heute bereits eine Notiz gelesen!")
                    return
                
end
            end
            local result 
training_master_skill.BuildMasterSkillList(pc.get_job(), pc.get_skill_group())
            
local vnum_list result[1]
            
local name_list result[2]
            if 
table.getn(vnum_list) == 0 then
                say
("Du besitzt keine Fertigkeiten, die")
                
say("gemeistert werden können.")
                return
            
end
            say
("Welche Fertigkeit möchtest du trainieren?")
            
say("")
            
local menu_list = {}
            
table.foreach(name_list, function(inametable.insert(menu_listnameend)
            
table.insert(menu_list"Abbrechen"
            
local s=select_table(menu_list)
            if 
table.getn(menu_list) == s then
                
return
            
end
            local skill_name
=name_list[s]
            
local skill_vnum=vnum_list[s]
            
local skill_level pc.get_skill_level(skill_vnum)
            
local title=string.format("%s auf G%d trainieren"skill_nameskill_level-20+1)
            if 
skill_level-20+1==10 then
                title
=string.format("%s auf P trainieren"skill_name)
            
end
                
if get_time() < pc.getqf("next_time"then
                
if pc.is_skill_book_no_delay() then
                    pc
.remove_skill_book_no_delay()
                else
                    
say("Bitte an die Admins wenden!")
                    return
                
end
            end
            pc
.setqf("next_time"get_time()+time_hour_to_sec(number(812)))
                        if 
pc.learn_master_skill(skill_vnumthen
                        say_title
(string.format("%s erfolgreich"title))
                    if 
40 == pc.get_skill_level(skill_vnumthen
                        say
(string.format("%s ist nun Gemeistert."skill_name))
                        
say("Herzlichen Glückwunsch!")
                    else
                        
say(string.format("Das Meistern war erfolgreich!"skill_nameskill_level-20+1+1))
                    
end
                    say
("")
                    
say_reward("Erfolgreich!")
                    
say("")
                
end
            
function BuildMasterSkillList(jobgroup)
            
MASTER_SKILL_LEVEL 20
            GRAND_MASTER_SKILL_LEVEL 
29
            local skill_list 
special.active_skill_list[job+1][group]
            
local ret_vnum_list = {}
            
local ret_name_list = {}
            
table.foreach(skill_list
            function(
iskill_vnum
            
local skill_level pc.get_skill_level(skill_vnum)
            if 
skill_level >= MASTER_SKILL_LEVEL and skill_level GRAND_MASTER_SKILL_LEVEL then
                table
.insert(ret_vnum_listskill_vnum)
                
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
                if 
name == nil then name=skill_vnum end
                table
.insert(ret_name_listname)
            
end
            end
)
            return {
ret_vnum_listret_name_list}
        
end
    end
end 

Putty:

PHP Code:
WHEN  70036.use
assertion failure nested==0
Sonstiges
/andereskillstyle.quest:88:Error occured on compile Sonstiges/andereskillstyle.quest 
würde mich über paar Ideen und Problemlösungen freuen



Antigene is offline  
Old   #2
 
elite*gold: 55
Join Date: Aug 2011
Posts: 960
Received Thanks: 379
PHP Code:
quest training_grandmaster_skill begin
    state start begin
        when 70036.
use begin
            say_title
("Notiz")
            if 
pc.get_skill_group() == 0 then
                say
("Du besitzt keine Fertigkeiten, die")
                
say("gemeistert werden können.")
                return
            
end
            
if get_time() < pc.getqf("next_time"then -- and not is_test_server() then
                
if pc.is_skill_book_no_delay() then
                    say
("Durch den gebrauch einer Exorzismuss-")
                    
say("Schriftrolle kannst du einen weiteren")
                    
say("Skill lesen!")                
                    
wait()
                    
say_title("Notiz")
                else
                    
say("Du hast heute bereits eine Notiz gelesen!")
                    return
                
end
            end
            local result 
training_master_skill.BuildMasterSkillList(pc.get_job(), pc.get_skill_group())
            
local vnum_list result[1]
            
local name_list result[2]
            if 
table.getn(vnum_list) == 0 then
                say
("Du besitzt keine Fertigkeiten, die")
                
say("gemeistert werden können.")
                return
            
end
            say
("Welche Fertigkeit möchtest du trainieren?")
            
say("")
            
local menu_list = {}
            
table.foreach(name_list, function(inametable.insert(menu_listnameend)
            
table.insert(menu_list"Abbrechen"
            
local s=select_table(menu_list)
            if 
table.getn(menu_list) == s then
                
return
            
end
            local skill_name
=name_list[s]
            
local skill_vnum=vnum_list[s]
            
local skill_level pc.get_skill_level(skill_vnum)
            
local title=string.format("%s auf G%d trainieren"skill_nameskill_level-20+1)
            if 
skill_level-20+1==10 then
                title
=string.format("%s auf P trainieren"skill_name)
            
end
            
if get_time() < pc.getqf("next_time"then
                
if pc.is_skill_book_no_delay() then
                    pc
.remove_skill_book_no_delay()
                else
                    
say("Bitte an die Admins wenden!")
                    return
                
end
            end
            pc
.setqf("next_time"get_time()+time_hour_to_sec(number(812)))
            if 
pc.learn_master_skill(skill_vnumthen
                say_title
(string.format("%s erfolgreich"title))
                if 
40 == pc.get_skill_level(skill_vnumthen
                    say
(string.format("%s ist nun Gemeistert."skill_name))
                    
say("Herzlichen Glückwunsch!")
                else
                    
say(string.format("Das Meistern war erfolgreich!"skill_nameskill_level-20+1+1))
                
end
                say
("")
                
say_reward("Erfolgreich!")
                
say("")
            
end
            
function BuildMasterSkillList(jobgroup)
            
MASTER_SKILL_LEVEL 20
            GRAND_MASTER_SKILL_LEVEL 
29
            local skill_list 
special.active_skill_list[job+1][group]
            
local ret_vnum_list = {}
            
local ret_name_list = {}
            
table.foreach(skill_list
            function(
iskill_vnum
            
local skill_level pc.get_skill_level(skill_vnum)
            if 
skill_level >= MASTER_SKILL_LEVEL and skill_level GRAND_MASTER_SKILL_LEVEL then
                table
.insert(ret_vnum_listskill_vnum)
                
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
                if 
name == nil then name=skill_vnum end
                    table
.insert(ret_name_listname)
                
end
            end
)
            return {
ret_vnum_listret_name_list}
            
end
        end
    end
end 
probiers mal so


x'Radon is offline  
Old   #3
 
elite*gold: 25
Join Date: Jun 2011
Posts: 1,611
Received Thanks: 351
Sag mir genau was du dort verändert hast will mein Fehler wissen
Antigene is offline  
Old   #4
 
elite*gold: 55
Join Date: Aug 2011
Posts: 960
Received Thanks: 379
Am ende hat ein end gefehlt. unter return
x'Radon is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
Quest Problem
Hey Leute , ich hab eine Quest die hat keine Fehler (Laut VirtualBox) aber wenn ich den Lagerverwalter anklicke passiert nichts. Ich hoffe ihr...
2 Replies - Metin2 PServer - Discussions / Questions
[HELP] Quest Problem
-German- Die Suche ist etwa 20091 geben die hwang Rüstungen für den Spieler, wenn sie die erforderlichen Materialien Ich habe meine eigene Suche,...
5 Replies - Metin2 PServer - Discussions / Questions
Compile all quest without quest's files list // Kompilieren Sie alle Quest ohne Quest
ENGLISH Hello dear community, this is a very simple guide but at the same time useful. How to compile ALL quest in the folder "quest" without the...
3 Replies - Metin2 PServer Guides & Strategies
[Problem] Problem with server starting - cannot find quest index for PaxHeader
Hello! I have this same problem as here when i'm starting my server: ...
1 Replies - Metin2 PServer - Discussions / Questions



All times are GMT +1. The time now is 22:30.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.