*Problemă / Intrebare: Salut! As vrea sa modific questul pentru Piatra Spiritului sa nu mai scada deloc gradul jucatorilor la folosire, iar rata de succes sa fie 100%. Imi poate arata cineva unde trebuie modificat? Multumesc.
*Tipologie server(PvM / PvP): PvM - PvP
*Resursă folosită:
*ServerFiles utilizat: Happiness
*Syserr:
*Poză:
*Detalii suplimentare:
Modificare Piatra Spiritului
Cel mai mic numar pe care l-am scos la scaderea in grad e -1 pe folosire, mai jos de -1 nu ma lasa. Daca pun 0 nu mai functioneaza questu. Trebuie sa scot o functie cumva dar nu prea reusesc sa vad care e functia care imi trebuie.
Edit:
Cam asta e questul nemodificat. Eu am incercat sa sters functii si sa modific numerele dar nu ma pricep asa bine si mi-e ca mai rau il stric. Las questul celor care inteleg mai bine toate functiile din el.
Edit:
Cod: Selectaţi tot
say_title ( "Piatra Spiritului" )
if pc . get_skill_group ( ) == 0 then
say ( "2" .. pc . get_skill_group ( ) )
return
end
if pc . count_item ( 71002 ) >= 1 then
say ( "Ai Pergament Reset Skill in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Pergament Reset Skill din inventar in alt loc!" )
return
end
if pc . count_item ( 71048 ) >= 1 then
say ( "Ai Vraja schimbarii in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta vraja schimbarii din inventar in alt loc!" )
return
end
if pc . count_item ( 71054 ) >= 1 then
say ( "Ai Tinctura Regatelor in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Tinctura Regatelor din inventar in alt loc!" )
return
end
if pc . count_item ( 71003 ) >= 1 then
say ( "Ai Pergament Reset Skill in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Pergament Reset Skill din inventar in alt loc!" )
return
end
if pc . count_item ( 71103 ) >= 1 then
say ( "Ai Redistribuire (VIT) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (VIT) din inventar in alt loc!" )
return
end
if pc . count_item ( 71104 ) >= 1 then
say ( "Ai Redistribuire (INT) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (INT) din inventar in alt loc!" )
return
end
if pc . count_item ( 71105 ) >= 1 then
say ( "Ai Redistribuire (STR) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (STR) din inventar in alt loc!" )
return
end
if pc . count_item ( 71106 ) >= 1 then
say ( "Ai Redistribuire (DEX) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (DEX) din inventar in alt loc!" )
return
end
if get_time ( ) < pc . getqf ( "next_time" ) then
if pc . is_skill_book_no_delay ( ) then
say ( "" )
say ( "Folosirea acestei pietre urca puterea competentelor" )
say ( "la un alt nivel, iar in acelasi timp iti scade numarul")
say ( "de puncte acumulate in grad." )
say ( "Dupa perfectionarea competentelor este recomandata")
say ( "folosirea Boabelor Zen pentru readucerea gradului in" )
say ( "stat neutru.")
wait ( )
say_title ( "Piatra Spiritului" )
else
say ( "" )
say ( "Te rog aºteaptã puþin timp pentru " )
say ( "a ridica competenþele la un alt nivel. " )
return
end
end
local result = training_grandmaster_skill . BuildGrandMasterSkillList ( 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 ( "" )
say ( "Momentan nu ai nici o competenþã care trebuie " )
say ( "urcatã la un alt nivel ! " )
say ( "" )
say ( "Incearcã mai târziu ! " )
return
end
say ( "" )
say ( "Te rog alege competenþa pe care doreºti sã o creºti. " )
say ( "" )
local menu_list = { }
table . foreach ( name_list , function ( i , name ) table . insert ( menu_list , name ) end )
table . insert ( menu_list , "Ieºire " )
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 -cenzurat-_alignment = pc . get_real_alignment ( )
local need_alignment = 1000 + 500 * ( skill_level - 30 )
test_chat ( "²{¦bµ½´cÈ: " .. -cenzurat-_alignment )
test_chat ( "»Ýnµ½´cÈ: " .. need_alignment )
local title = string . format ( "Competenþa %s urcã la nivel %d" , skill_name , skill_level - 30 + 1 )
say_title ( title )
say ( "" )
say ( "Doreºti sã creºti aceastã competenþã? " )
say ( "" )
if -cenzurat-_alignment < - 19000 + need_alignment then
say_reward ( "12" )
return
end
if -cenzurat-_alignment < 0 then
say_reward ( string . format ( "Puncte: %d -> %d" , need_alignment , need_alignment * 2 ) )
say_reward ( "Doreºti sã creºti aceastã competenþã ? " )
need_alignment = need_alignment * 2
elseif -cenzurat-_alignment < need_alignment then
say_reward ( string . format ( "Puncte: %d" , need_alignment ) )
say_reward ( "Doreºti sã creºti aceastã competenþã ? " )
else
say_reward ( string . format ( "Competenþa creºte la: %d de puncte" , need_alignment ) )
end
say ( "" )
local s = select ( "Da" , "Nu, Mulþumesc " )
if s == 2 then
return
end
if -cenzurat-_alignment >= 0 and -cenzurat-_alignment < need_alignment then
say_title ( string . format ( "%s" , title ) )
say ( "" )
say ( "Pentru a urca aceastã competenþã , vei avea " )
say ( "nevoie de un cuvânt cheie , introdu cuvântul " )
say ( "cheie in casuþa de mai jos ! " )
say ( "" )
say_reward ( "MT2" )
say ( "" )
local s = input ( )
if s ~= "MT2" then
return
end
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 ( "21" )
return
end
end
pc . setqf ( "next_time" , get_time ( ) + time_hour_to_sec ( number ( 8 , 12 ) ) )
if need_alignment > 0 then
if pc . learn_grand_master_skill ( skill_vnum ) then
pc . change_alignment ( - need_alignment )
say_title ( string . format ( "%s" , title ) )
if 40 == pc . get_skill_level ( skill_vnum ) then
say ( string . format ( "%s 20." , skill_name ) )
else
say ( "" )
say ( string . format ( "%s A fost upgradatã cu succes ! " , skill_name , skill_level - 30 + 1 + 1 ) )
end
say_reward ( "Competenþa ta a ajus la " )
say_reward ( string . format ( "%d de Puncte." , need_alignment ) )
say ( "" )
else
say_title ( string . format ( "%s" , title ) )
say ( "" )
say ( "Ridicarea competenþei la urmãtorul nivel " )
say_reward ( "A eºuat ! Te rog încearcã mai târziu. " )
say ( "" )
pc . change_alignment ( - number ( need_alignment / 3 , need_alignment / 2 ) )
end
end
pc.remove_item(50513, 1)
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Incearca asa:DragonA7X scrie:*Problemă / Intrebare: Salut! As vrea sa modific questul pentru Piatra Spiritului sa nu mai scada deloc gradul jucatorilor la folosire, iar rata de succes sa fie 100%. Imi poate arata cineva unde trebuie modificat? Multumesc.
*Tipologie server(PvM / PvP): PvM - PvP
*Resursă folosită:
*ServerFiles utilizat: Happiness
*Syserr:
*Poză:
*Detalii suplimentare:
Cod: Selectaţi tot
say_title ( "Piatra Spiritului" )
if pc.get_skill_group() == 0 then
say("2" .. pc.get_skill_group())
return
end
if pc.count_item(71002) >= 1 then
say ( "Ai Pergament Reset Skill in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Pergament Reset Skill din inventar in alt loc!" )
return
end
if pc . count_item ( 71048 ) >= 1 then
say ( "Ai Vraja schimbarii in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta vraja schimbarii din inventar in alt loc!" )
return
end
if pc . count_item ( 71054 ) >= 1 then
say ( "Ai Tinctura Regatelor in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Tinctura Regatelor din inventar in alt loc!" )
return
end
if pc . count_item ( 71003 ) >= 1 then
say ( "Ai Pergament Reset Skill in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Pergament Reset Skill din inventar in alt loc!" )
return
end
if pc . count_item ( 71103 ) >= 1 then
say ( "Ai Redistribuire (VIT) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (VIT) din inventar in alt loc!" )
return
end
if pc . count_item ( 71104 ) >= 1 then
say ( "Ai Redistribuire (INT) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (INT) din inventar in alt loc!" )
return
end
if pc . count_item ( 71105 ) >= 1 then
say ( "Ai Redistribuire (STR) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (STR) din inventar in alt loc!" )
return
end
if pc . count_item ( 71106 ) >= 1 then
say ( "Ai Redistribuire (DEX) in inventar" )
say ( "Pentru a putea folosi pietrele spirit," )
say ( "muta Redistribuire (DEX) din inventar in alt loc!" )
return
end
if get_time() < pc.getqf("next_time") then
if pc.is_skill_book_no_delay() then
say ( "" )
say ( "Folosirea acestei pietre urca puterea competentelor" )
say ( "la un alt nivel, iar in acelasi timp iti scade numarul")
say ( "de puncte acumulate in grad." )
say ( "Dupa perfectionarea competentelor este recomandata")
say ( "folosirea Boabelor Zen pentru readucerea gradului in" )
say ( "stat neutru.")
wait ( )
say_title ( "Piatra Spiritului" )
else
say ( "" )
say ( "Te rog aºteaptã puþin timp pentru " )
say ( "a ridica competenþele la un alt nivel. " )
return
end
end
local result = training_grandmaster_skill.BuildGrandMasterSkillList(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 ( "" )
say ( "Momentan nu ai nici o competenþã care trebuie " )
say ( "urcatã la un alt nivel ! " )
say ( "" )
say ( "Incearcã mai târziu ! " )
return
end
say("")
say("Te rog alege competenþa pe care doreºti sã o creºti. ")
say("")
local menu_list = {}
table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
table.insert(menu_list, "Ieºire ")
local s = select_table(menu_list)
if table.getn(menu_list) == s then
return
else
local skill_name = name_list[s]
local skill_vnum = vnum_list[s]
local skill_level = pc.get_skill_level(skill_vnum)
local skill_level_up = (pc.get_skill_level(skill_vnum)) + 1
local title = string.format("Competenþa %s urcã la nivel %d", skill_name, skill_level - 30 + 1)
say_title(title)
say("" )
say("Doreºti sã creºti aceastã competenþã? ")
say("")
local s = select("Da", "Nu, Mulþumesc ")
if s == 2 then
return
else
if get_time() < pc.getqf("next_time") then
if pc.is_skill_book_no_delay()then
pc.remove_skill_book_no_delay()
else
say ( "21" )
return
end
end
pc.setqf("next_time", get_time() + time_hour_to_sec(number(8, 12)))
say_title ( string.format("%s", title))
if 40 == pc.get_skill_level(skill_vnum) then
say(string.format("%s 20.", skill_name))
else
say("")
say(string.format("%s A fost upgradatã cu succes ! ", skill_name, skill_level - 30 + 1 + 1))
pc.set_skill_level(skill_vnum_up)
end
end
pc.remove_item(50513, 1)Multumesc pentru raspuns Raffael, dar acum sunt si eu in dilema cu ce mi-ai trimis. Tu stii mai bine ce ai modificat acolo si daca ai uitat vreo paranteza nu e bai pentru ca se poate rezolva, treaba e ca singura metoda cu care eu pot verifica daca e bun questu sau nu e sa dau reload q pentru ca nu e un quest normal sa il compilez. Ar fi mai usor daca l-as transforma in quest? Cel putin la compilare iti spune o eroare dupa care te ghidezi iar acolo iti pot spune eroarea.
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Da. AdaugaDragonA7X scrie:Multumesc pentru raspuns Raffael, dar acum sunt si eu in dilema cu ce mi-ai trimis. Tu stii mai bine ce ai modificat acolo si daca ai uitat vreo paranteza nu e bai pentru ca se poate rezolva, treaba e ca singura metoda cu care eu pot verifica daca e bun questu sau nu e sa dau reload q pentru ca nu e un quest normal sa il compilez. Ar fi mai usor daca l-as transforma in quest? Cel putin la compilare iti spune o eroare dupa care te ghidezi iar acolo iti pot spune eroarea.
Cod: Selectaţi tot
quest training_grandmaster_skill begin
state start begin
when 50513.use beginCod: Selectaţi tot
end
end
function BuildGrandMasterSkillList(job, group)
GRang_MASTER_SKILL_LEVEL = 30
PERFECT_MASTER_SKILL_LEVEL = 40
local skill_list = special.active_skill_list[job+1][group]
local ret_vnum_list = {}
local ret_name_list = {}
table.foreach(skill_list,
function(i, skill_vnum)
local skill_level = pc.get_skill_level(skill_vnum)
if skill_level >= GRang_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL then
table.insert(ret_vnum_list, skill_vnum)
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
if name == nil then name=skill_vnum end
table.insert(ret_name_list, name)
end
end)
return {ret_vnum_list, ret_name_list}
end
end
end- Pentru acest mesaj, [RaffaeL] for the post:
- alinjuve23
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Cauta local skill_level_up in quest, si modifica asa:DragonA7X scrie:Questul am reusit sa il compilez, iar la folosire imi spune ca skillul a fost upgradat cu succes, dar el ramane acelasi G.
Cod: Selectaţi tot
local skill_level_up = (pc.get_skill_level(skill_vnum) + 1)-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 52 vizitatori





