Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 15:47

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

 

7.2 on_player_level_up HELP

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2011
Posts: 38
Received Thanks: 0
7.2 on_player_level_up HELP

PHP Code:
function get_module_name()
return 
"on_player_level_up"
end

function on_player_level_up()

local lv get_value"level" )
local max_reached_level gv"max_reached_level" )

local i
for max_reached_level lv do
if 
== 3 then
notice
'A new Player reached Lv 4, GZ!'

elseif == 5 then
notice
'A new Player reached Lv 6, GZ!'

elseif == 19 then
notice
'A new Player reached Lv 20, GZ!'


elseif == 49 then
notice
'A new Player reached Lv 50, GZ!'

elseif == 79 then
notice
'A new Player reached Lv 80, GZ!'

elseif == 99 then
notice
'A new Player reached Lv 100, GZ!'

elseif == 149 then
notice
'A new Player reached Lv 150, GZ!'

end

end
end

function on_player_level_upname )

    
local txtycurrent_xisland_numberilv

    
if get_value"level" ) <= 5 then
--        -- &#44033; 1번 섬의 텔레포트 좌표
--        tx 30315
--        ty 5480

        
-- &#54788;재귀환 위치를 가져옴.
        
current_x get_flag"rx" )

        -- &
#47751; 번 째 섬인지 확인.
--        for 1do
--            if 
current_x < ( 18816 * (i-1) + tx) and current_x 3000 > ( (18816 * (i-1) + tx) - 10000then
--                island_number i
--            end
--        end
        
-- &#44480;환지역을 현재 초보자섬 캠프으로 설정
        
set_flag"rx"172543 math.random(0,100))
        
set_flag"ry"51847 math.random(0,100))
    
end
 
    
-- &#44397;가 코드 읽어오기
        
-- get_local_info()&#51032; 반환값들
        
--LOCAL_INFO_KOREA                      1
        
--LOCAL_INFO_HONGKONG                   2
        
--LOCAL_INFO_AMERICA                    4
        
--LOCAL_INFO_GERMANY                    8
        
--LOCAL_INFO_JAPAN                      16
        
--LOCAL_INFO_TAIWAN                     32
        
--LOCAL_INFO_CHINA                      64
        
--LOCAL_INFO_FRANCE                     128
        
--LOCAL_INFO_RUSSIA                     256
        
        
    local state_code 
get_local_info()    
     
    -- 
18&#47112;벨 이상이나 수련자의 섬 내에 있는 경우 종족 마을로 귀환 지점 설정
    
local current_x gv("x")
    
local current_y gv("y")
    
local race get_value"race" )

    -- &
#48120;국이면 무조건 안보냄 (전 국가 적용 안함으로 변경 08.07.29)
    
if state_code == 511 then
        
-- &#50500;무짓도 안해요
        
    
elseif get_value"level" ) >= 18 then
    
        
-- &#49688;련자의 섬에 있는지 여부 체크
        
if current_x >= 161280 and current_x <= 177408 then
            
if current_y >= 48384 and current_y <= 64512 then
            
            
-- &#54788;재귀환 위치를 가져옴.
            
local return_x get_flag"rx" )
            
local return_y get_flag"ry" )
                        
            -- &
#49688;련자의 섬이 귀환인지 체크
                
if return_x == 173183 and return_y == 52299 then
            
                    
-- &#44480;환지역을 해당 종족 마을로 설정
                
                    
-- &#45936;바일 경우
                    
if race == 4 then
                        set_flag
"rx"6625 math.random(0,100))
                        
set_flag"ry"6980 math.random(0,100))
                    
                    -- &
#50500;수라일 경우
                    
elseif race == 5 then
                        set_flag
"rx"116799 math.random(0,100))
                        
set_flag"ry"58205 math.random(0,100))
                    
                    -- &
#44032;이아일 경우
                    
else
                        
set_flag"rx"153513 math.random(0,100))
                        
set_flag"ry"77203 math.random(0,100))
                    
end -- if race == 4 then
                
                
-- &#49688;련자의 섬에 있고 18레벨 이상이기 때문에 해당 종족 마을로 강제 귀환 설정 됐다는 메시지 날림.
                
message"@235")
                
                
end -- if return_x == 173183 and return_y == 52299
            end 
-- if current_y >= 48384 and current_y <= 64512 then
        end 
-- if current_x >= 161280 and current_x <= 177408 then
                
    
    
    end 
-- if get_value"level" ) >= 18 then
    
    
-- &#50724;토로 세팅된 캐릭터라면 저 멀리 날려 버리자~
    
kick_auto_to_another_world()

    -- &
#49688;련자 섬에 있는 오토들은 본토로 날려 버리자
    
local current_x gv("x")
    
local current_y gv("y")
    
local race get_value"race" )
 
    if 
current_x >= 161280 and current_x <= 177408 then
        
if current_y >= 48384 and current_y <= 64512 then
        
            local is_auto
quest_count
            quest_count
is_auto anti_auto_quest_check()
    
            if 
is_auto then
            
                 
if race == 4 then
                    RunTeleport_Auto_TO_City
6625 6980 )
                elseif 
race == 5 then
                    RunTeleport_Auto_TO_City
116799 58205 )
                else
                    
RunTeleport_Auto_TO_City153506 77175 )
                
end
                
            end 
-- if is_auto then
            
        end 
-- if current_y >= 48384 and current_y <= 64512 then
    end 
-- if current_x >= 161280 and current_x <= 177408 then

    save
()

end 
I need help fixing the The level-up announcement, i used max_reached_level because i don't want it when someone lose exp and level-up again that announcement go again.

for example: a character reached 150 and the announcement goes, and then he lose exp and becomes 149 and then level 150 and the announcement goes again, i want it to be just one time thing.

that code above is not working at all.



abodanty is offline  
Old   #2
Moderator
 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,005
Received Thanks: 960
You can't have 2 functions with the same name.

Try including your script inside of the original script instead of adding a second with the same name...

function on_player_level_up()
function on_player_level_up( name )

They are the same function just one has a variable declared and one does not.

Not sure if your variable math will work or not but right now the game is probably ignoring it anyway.


ThunderNikk is offline  
Old   #3
 
elite*gold: 0
Join Date: Oct 2011
Posts: 38
Received Thanks: 0
PHP Code:
function on_player_level_upname )

    
local txtycurrent_xisland_number

    
if get_value"level" ) <= 5 then
--        -- &#44033; 1번 섬의 텔레포트 좌표
--        tx 30315
--        ty 5480

        
-- &#54788;재귀환 위치를 가져옴.
        
current_x get_flag"rx" )

        -- &
#47751; 번 째 섬인지 확인.
--        for 1do
--            if 
current_x < ( 18816 * (i-1) + tx) and current_x 3000 > ( (18816 * (i-1) + tx) - 10000then
--                island_number i
--            end
--        end
        
-- &#44480;환지역을 현재 초보자섬 캠프으로 설정
        
set_flag"rx"172543 math.random(0,100))
        
set_flag"ry"51847 math.random(0,100))
    
end
 
    
-- &#44397;가 코드 읽어오기
        
-- get_local_info()&#51032; 반환값들
        
--LOCAL_INFO_KOREA                      1
        
--LOCAL_INFO_HONGKONG                   2
        
--LOCAL_INFO_AMERICA                    4
        
--LOCAL_INFO_GERMANY                    8
        
--LOCAL_INFO_JAPAN                      16
        
--LOCAL_INFO_TAIWAN                     32
        
--LOCAL_INFO_CHINA                      64
        
--LOCAL_INFO_FRANCE                     128
        
--LOCAL_INFO_RUSSIA                     256
        
        
    local state_code 
get_local_info()    
     
    -- 
18&#47112;벨 이상이나 수련자의 섬 내에 있는 경우 종족 마을로 귀환 지점 설정
    
local current_x gv("x")
    
local current_y gv("y")
    
local race get_value"race" )
--================================
THIS THE CODE=====================================================================        

    
local lv get_value"level" )
    
local max_reached_level gv"max_reached_level" )
    
local i
         
for max_reached_level lv do
             if 
== 3 then
             notice
'A new Player reached Lv 4, GZ!'

             
elseif == 5 then
             notice
'A new Player reached Lv 6, GZ!'

             
elseif == 19 then
             notice
'A new Player reached Lv 20, GZ!'


             
elseif == 49 then
             notice
'A new Player reached Lv 50, GZ!'

             
elseif == 79 then
             notice
'A new Player reached Lv 80, GZ!'

             
elseif == 99 then
             notice
'A new Player reached Lv 100, GZ!'

             
elseif == 149 then
             notice
'A new Player reached Lv 150, GZ!'
             
end
        end 

    
-- &#48120;국이면 무조건 안보냄 (전 국가 적용 안함으로 변경 08.07.29)
    
if state_code == 511 then
        
-- &#50500;무짓도 안해요
        
    
elseif get_value"level" ) >= 18 then
    
        
-- &#49688;련자의 섬에 있는지 여부 체크
        
if current_x >= 161280 and current_x <= 177408 then
            
if current_y >= 48384 and current_y <= 64512 then
            
            
-- &#54788;재귀환 위치를 가져옴.
            
local return_x get_flag"rx" )
            
local return_y get_flag"ry" )
                        
            -- &
#49688;련자의 섬이 귀환인지 체크
                
if return_x == 173183 and return_y == 52299 then
            
                    
-- &#44480;환지역을 해당 종족 마을로 설정
                
                    
-- &#45936;바일 경우
                    
if race == 4 then
                        set_flag
"rx"6625 math.random(0,100))
                        
set_flag"ry"6980 math.random(0,100))
                    
                    -- &
#50500;수라일 경우
                    
elseif race == 5 then
                        set_flag
"rx"116799 math.random(0,100))
                        
set_flag"ry"58205 math.random(0,100))
                    
                    -- &
#44032;이아일 경우
                    
else
                        
set_flag"rx"153513 math.random(0,100))
                        
set_flag"ry"77203 math.random(0,100))
                    
end -- if race == 4 then
                
                
-- &#49688;련자의 섬에 있고 18레벨 이상이기 때문에 해당 종족 마을로 강제 귀환 설정 됐다는 메시지 날림.
                
message"@235")
                
                
end -- if return_x == 173183 and return_y == 52299
            end 
-- if current_y >= 48384 and current_y <= 64512 then
        end 
-- if current_x >= 161280 and current_x <= 177408 then
                
    
    
    end 
-- if get_value"level" ) >= 18 then
    
    
-- &#50724;토로 세팅된 캐릭터라면 저 멀리 날려 버리자~
    
kick_auto_to_another_world()

    -- &
#49688;련자 섬에 있는 오토들은 본토로 날려 버리자
    
local current_x gv("x")
    
local current_y gv("y")
    
local race get_value"race" )
 
    if 
current_x >= 161280 and current_x <= 177408 then
        
if current_y >= 48384 and current_y <= 64512 then
        
            local is_auto
quest_count
            quest_count
is_auto anti_auto_quest_check()
    
            if 
is_auto then
            
                 
if race == 4 then
                    RunTeleport_Auto_TO_City
6625 6980 )
                elseif 
race == 5 then
                    RunTeleport_Auto_TO_City
116799 58205 )
                else
                    
RunTeleport_Auto_TO_City153506 77175 )
                
end
                
            end 
-- if is_auto then
            
        end 
-- if current_y >= 48384 and current_y <= 64512 then
    end 
-- if current_x >= 161280 and current_x <= 177408 then

    save
()

end 
I let only one function and its still the same, idk where is the problem
abodanty is offline  
Old   #4
Moderator
 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,005
Received Thanks: 960
-- for i = 1, 6 do
-- if current_x < ( 18816 * (i-1) + tx) and current_x + 3000 > ( (18816 * (i-1) + tx) - 10000) then
-- island_number = i

i is already declared.

Make sure your if and ends match...you kind of just shoved your code in there with no rhyme or reason for location of said code.

I would have added it before the last end.


ThunderNikk is offline  
Thanks
1 User
Old   #5
 
elite*gold: 0
Join Date: Oct 2011
Posts: 38
Received Thanks: 0
Thanks, i gave up on it


abodanty is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
[HELP]HELP HELP HELP[HELP]
GUYS ^^ THIS IS A HELP THREAD NOT REQUEST THREAD BUT YOU CAN CONSIDER IT AS REQUEST THREAD DOES ANYONE OF YOU KNOW THE AUTO SUBMIT PHP CODE?...
3 Replies - Facebook
[HELP][HELP][HELP][HELP]!!
Microsoft Visual C++ Run time error! :(:( **HELP ME PLEASE!!***
3 Replies - Soldier Front
help help help help help help
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in...
0 Replies - Say Hello



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


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

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