[RaffaeL] scrie:Cukycuky scrie:[RaffaeL] scrie:
Poftim:quest cufar_vip begin state start begin when 38053.use begin say_title("FinalSinceMt2-Team") say("") say("Mit diesem Item kannst du den Premium Status") say("aktivieren. Der Premium Status bleibt") say("Permanent! Du Kannst dieses Item nur einmal") say("benutzen. Also entscheide Weise") say("") say_title("Willst du den Premium Status Aktivieren?") local change = select("Da", "Nu") if change == 2 then return end if change == 1 then pc.remove_item(38053, 1) pc.give_item2(70021, 1) pc.give_item2(41324, 1) pc.give_item2(41325, 1) pc.give_item2(50513, 50) pc.give_item2(80007, 1) pc.give_item2(80007, 1) local hostname="nume server" name = pc.get_name() lname = string.len(name) if change == 1 and lname <= 8 then mysql_query("UPDATE player.player SET name='[VIP]"..pc.get_name().."' WHERE name='"..pc.get_name().."'") say_title("Nume schimbat cu succes!") say("Felicitari! Acum esti VIP pe "..hostname) say("") say("") say("Informatie") say_reward("Schimbarea in statusul (VIP) poate dura 15-20 de minute..") elseif lname > 8 then say_title("Numele tau!") say("Numnele tau este prea lung.") say("Numele nu are voie sa aiba mai mult de 8 caractere.") say("Daca nu respecti regula, la schimbarea numelui, ") say("acesta poate fi incomplet") say("") say_reward("Vrei totusi sa continui?") local a = select("Da", "Nu") if a == 2 then return end if a == 1 then say_title("Schimbarea numelui") say("Introdu numele dorit:") say_reward("Fii atent!Nu mai mult de 8 caractere.") local inp = input() if string.len(inp) > 8 or inp == "" then say("Numele tau are mai mult de 8 caractere.") say("Imi pare sincer rau.") return else say_title("In regula") say("Numele tau respecta cerinta.") say("") say("Esti sigur ca vrei sa activezi statusul VIP") say("cu numele (VIP)", inp," ?") local b = select("Da", "Nu") if b == 2 then return else mysql_query("UPDATE player.player SET name='[VIP]"..inp.."' WHERE name='"..pc.get_name().."'") say_title("Nume schimbat cu succes!") say("Felicitari! Acum esti VIP pe "..hostname) say("") say("") say("Info") say_reward("Schimbarea in statusul (VIP) poate dura 15-20 de minute..") end end end end end end end endIn cazul in care nu exista deja, adauga in questing.lua urmatoarea functie:mysql_query = function(query) if not pre then local rt = io.open('CONFIG','r'):read('*all') pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4') end math.randomseed(os.time()) local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{} -- os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'t')) end; os.remove(fi); for i = 2, table.getn(t) do table.foreach(t,function(a,B) out[i-1] = out[i-1] or {} out[i-1][a] = tonumber(B) or b or 'NULL' out[t[1][a]] = out[t[1][a]] or {} out[t[1][a]][i-1] = tonumber(B) or b or 'NULL' end) end return out end
Calls undeclared function! :
mysql_query
Am deja in questing ce mi-ai dat , si tot primesc asta.
Pentru orice eroare de tipul "Calls undeclared function!", ceea ce este dupa eroare, trebuie adaugat in quest_functions.
In cazul tau "mysql_query"
In regula , am uitat scuze .
Pentru ce e asta?
Cod: Selectaţi tot
mysql_query("UPDATE common.gmlist SET mAuthority='LOW_WIZARD' WHERE mAccount='"..pc.get_account_id().."' and WHERE mName='"..pc.get_name().."'")



