|
You last visited: Today at 16:39
Advertisement
[Lua]awaken weapons By Npc
Discussion on [Lua]awaken weapons By Npc within the Rappelz Private Server forum part of the Rappelz category.
02/02/2019, 14:35
|
#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 i, handle, lv, text, text2, command, enhance, f, price
for i = 0, 7 do
handle = get_wear_item_handle( i )
if handle ~= 0 then
lv = get_item_level( handle )
enhance = get_item_enhance( handle )
if lv == 0 then
set_item_level( handle , 1 )
end
price = get_item_price( handle )
if get_item_code( handle ) >= 3100020 and get_item_code( handle ) <= 3100026 then
elseif get_item_code( handle ) >= 3100027 and get_item_code( handle ) <= 3100031 then
end
if enhance ~= 0 then
text = sconv("@90010010", "#@enhance_level@#",tostring(enhance) ,"#@item_name@#", "@" .. tostring( get_item_name_id( get_item_code( handle ) ) ) , "#@item_Lv@#",tostring(lv))
else
text = sconv("@90010011", "#@item_name@#", "@" .. tostring( get_item_name_id( get_item_code( handle ) ) ), "#@item_Lv@#",tostring(lv))
end
if price > 20 then
command = 'blo1zasa( ' .. handle .. ' )'
dlg_menu( text, command )
end
end
end
if get_env("game.cash_usable_server") == 0 then
else
end
dlg_menu( "@90010002", '' )
dlg_show()
end
function blo1zasa( handle )
handle = get_wear_item_handle( i )
item_code = get_item_code( handle )
insert_awaken(handle,5,5)
local value_1 = get_item_random_option( handle, 1 )
local value_2 = get_item_random_option( handle, 2 )
if value_1 ~= 0 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( handle, 1, value_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( handle, 2, value_2[1], value_2[2], value_2[3] )
end
end
text = sconv("Awk Sec", "#@item_name@#", "@" .. tostring( get_item_name_id( get_item_code( handle ) ) ))
cprint( text )
chihab_item_love_menu()
end
|
|
|
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
|
|
|
09/15/2019, 09:57
|
#3
|
elite*gold: 0
Join Date: Sep 2015
Posts: 603
Received Thanks: 1,201
|
Quote:
Originally Posted by petirzero77
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.
|
|
|
09/17/2019, 01:10
|
#4
|
elite*gold: 0
Join Date: Nov 2012
Posts: 947
Received Thanks: 258
|
Quote:
Originally Posted by petirzero77
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
|
|
|
09/17/2019, 21:18
|
#5
|
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.
|
|
|
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
|
|
|
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
|
|
|
09/02/2020, 02:03
|
#8
|
elite*gold: 0
Join Date: Mar 2020
Posts: 21
Received Thanks: 1
|
Quote:
Originally Posted by InkDevil
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 ?
|
|
|
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.
|
|