Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 16:39

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

Advertisement



[Lua]awaken weapons By Npc

Discussion on [Lua]awaken weapons By Npc within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2016
Posts: 31
Received Thanks: 20
[Lua]awaken weapons By Npc

this is sempl scrept Alow you to awke a weapons




PHP Code:
function chihab_it1em_love_menu()

dlg_title"@90100301" )
dlg_text_without_quest_menu"@90100302" )
dlg_menu"@80010173""Quest_Link_119_1()" )
else
dlg_text"@90100302" )
    
local ihandlelvtexttext2commandenhancefprice
    
for 0do
        
handle get_wear_item_handle)
        if 
handle ~= 0 then
            lv 
get_item_levelhandle )
            
enhance =  get_item_enhancehandle )
            if 
lv == 0 then
set_item_level
handle )
            
end
            price 
get_item_pricehandle )
            if 
get_item_codehandle ) >= 3100020 and get_item_codehandle ) <= 3100026 then    
            
elseif get_item_codehandle ) >= 3100027 and get_item_codehandle ) <= 3100031 then
            end
                
if enhance ~= 0 then
                text 
sconv("@90010010""#@enhance_level@#",tostring(enhance) ,"#@item_name@#""@" .. tostringget_item_name_idget_item_codehandle ) ) ) , "#@item_Lv@#",tostring(lv))

                else
                    
text sconv("@90010011""#@item_name@#""@" .. tostringget_item_name_idget_item_codehandle ) ) ), "#@item_Lv@#",tostring(lv))
                
                
end
            
if price 20 then
            command 
'blo1zasa( ' .. handle .. ' )'
            
dlg_menutextcommand )
            
end

        end
 
    end
    
if get_env("game.cash_usable_server") == 0 then
    
else
    
end
    dlg_menu
"@90010002"'' )
    
dlg_show()
        
end

function blo1zasahandle )
handle get_wear_item_handle)                
item_code get_item_codehandle )
insert_awaken(handle,5,5)
local value_1 get_item_random_optionhandle)
local value_2 get_item_random_optionhandle)
if 
value_1 ~= and value_1 ~= -1 then
if value_1[1] == 96 and value_1[2] == 512 then
value_1
[3] = value_1[3]*2
set_item_random_option
handle1value_1[1], value_1[2], value_1[3] )
end
if value_2[1] == 96 and value_2[2] == 1024 then
value_2
[3] = value_2[3]*2
set_item_random_option
handle2value_2[1], value_2[2], value_2[3] )
end
end        
text 
sconv("Awk Sec""#@item_name@#""@" .. tostringget_item_name_idget_item_codehandle ) ) ))
cprinttext )
chihab_item_love_menu()    
end 
chihab007 is offline  
Old 09/14/2019, 22:37   #2
 
elite*gold: 0
Join Date: Aug 2019
Posts: 6
Received Thanks: 0
hello..would you mind to guide & explain further how to use this script. where to execute it. im really confuse on this..

copy all this code into notepad++ and paste into where?

thanks
petirzero77 is offline  
Old 09/15/2019, 09:57   #3
 
InkDevil's Avatar
 
elite*gold: 0
Join Date: Sep 2015
Posts: 603
Received Thanks: 1,201
Quote:
Originally Posted by petirzero77 View Post
hello..would you mind to guide & explain further how to use this script. where to execute it. im really confuse on this..

copy all this code into notepad++ and paste into where?

thanks


The first part is a copied and edited NPC-Dialog, just except upgrading levels it connects to the second function.
(Just by the way, if I read the function correctly, it will also awake armors and belts.)

The second function is a copied function which in original re-sets defense random-stats of some older UG-Gear.
In his function it inserts awaken-stats (as wished for weapons it works fine) + doubles identified random-stats, if they're non-percent p.def and m.def, but it does without any limiter.


If I'm wrong, you can correct me

Edit: It won't work via copy&paste since the executing function has also an issue.
InkDevil is offline  
Old 09/17/2019, 01:10   #4
 
thefear511's Avatar
 
elite*gold: 0
Join Date: Nov 2012
Posts: 947
Received Thanks: 258
Quote:
Originally Posted by petirzero77 View Post
hello..would you mind to guide & explain further how to use this script. where to execute it. im really confuse on this..

copy all this code into notepad++ and paste into where?

thanks
check my signature for npc help it might lead you to the way
thefear511 is offline  
Old 09/17/2019, 21:18   #5
 
InkDevil's Avatar
 
elite*gold: 0
Join Date: Sep 2015
Posts: 603
Received Thanks: 1,201
Code:
function any_func_name_main()
	
	dlg_title("NPC Name")
		dlg_text("I will (re-)awake your weapon.<br>Choose which one!")
		for i= 0,1 do
			local handle = get_wear_item_handle(i)
			if handle ~= 0 and handle ~= -1 then
				dlg_menu( get_item_name_by_code(get_item_code(handle)), 'any_func_name_sub('..i..','..handle..')')
			end
		end
		dlg_menu("@90010002",'')
	dlg_show()
end

function any_func_name_sub( index, i_handle)
	local handle = get_wear_item_handle(index)
	if handle == i_handle then
		delete_awaken(handle)
		insert_awaken(handle,5,5)
		message("(Re-)Awakening was successful!")
	else
		message("You are not allowed to switch your equip during this process!")
	end
	any_func_name_main()
end
If you need an alternative right now. @
And use the advice thefear511 gave you.
InkDevil is offline  
Thanks
1 User
Old 09/27/2019, 12:59   #6
 
elite*gold: 0
Join Date: Aug 2019
Posts: 6
Received Thanks: 0
dear everyone..
thanks for the advice given..im now currently learning of basic .lua to help me improve my understanding on .lua language.

at the same time i'll keep following the guides given by @ and @11

thanks
petirzero77 is offline  
Old 02/07/2020, 12:11   #7
 
elite*gold: 0
Join Date: Mar 2019
Posts: 2
Received Thanks: 0
hey

i am using the weapon awaken code. on screen it changes all the start right but it dont change the players stats so not sure if i doing something wrong or not. im kinda new to .lua so im learning as i go with some success just hit a wall with the awakenings.

thanks for any help
stringofbean is offline  
Old 09/02/2020, 02:03   #8
 
elite*gold: 0
Join Date: Mar 2020
Posts: 21
Received Thanks: 1
Quote:
Originally Posted by InkDevil View Post
Code:
function any_func_name_main()
	
	dlg_title("NPC Name")
		dlg_text("I will (re-)awake your weapon.<br>Choose which one!")
		for i= 0,1 do
			local handle = get_wear_item_handle(i)
			if handle ~= 0 and handle ~= -1 then
				dlg_menu( get_item_name_by_code(get_item_code(handle)), 'any_func_name_sub('..i..','..handle..')')
			end
		end
		dlg_menu("@90010002",'')
	dlg_show()
end

function any_func_name_sub( index, i_handle)
	local handle = get_wear_item_handle(index)
	if handle == i_handle then
		delete_awaken(handle)
		insert_awaken(handle,5,5)
		message("(Re-)Awakening was successful!")
	else
		message("You are not allowed to switch your equip during this process!")
	end
	any_func_name_main()
end
If you need an alternative right now. @
And use the advice thefear511 gave you.
how can i make that work for acc too ?
tito2022 is offline  
Reply


Similar Threads Similar Threads
[HELP]How to awaken weapons with the Command?
02/02/2019 - Rappelz Private Server - 7 Replies
How to awaken weapons with the Command?:confused: Thx.
[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 +1. The time now is 16:40.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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