emm habe ein problem bekomme immer: Segmentation fault (core dumped)
quest anti_exp begin
state start begin
when kill with pc.getqf("exp_block")==1 and not npc.is_pc() begin
if pc.get_exp()>10000 then
pc.give_exp2(-pc.get_exp())
end
end
when 72501.use with pc.getqf("exp_block")==0 begin
chat("Ab jetzt bekommst du KEINE Exp mehr!")
pc.setqf("exp_block", 1)
end
when 72501.use with pc.getqf("exp_block")==1 begin
chat("Ab jetzt bekommst du wieder Exp!")
pc.setqf("exp_block", 0)
end
end
quest anti begin
state start begin
when 72501.use begin
if pc.getqf("antiexp") == 0 then
pc.setqf("antiexp", 1)
chat("Anti EXP aktiviert. Deine Erfahrungspunkte werden jede 3 Sekunden auf 0 gesetzt!")
local ep = pc.get_exp()
pc.give_exp2(-ep)
timer("erfahrung", 15)
elseif pc.getqf("antiexp") == 1 then
pc.setqf("antiexp", 0)
chat("Anti EXP deaktiviert. Viel Spaß auf Blax2!")
end
end
when erfahrung.timer with pc.getqf("antiexp") == 1 begin
local ep = pc.get_exp()
pc.give_exp2(-ep)
timer("erfahrung1", 15)
pc.setqf("antiexp", 1)
end
when erfahrung1.timer with pc.getqf("antiexp") == 1 begin
local ep = pc.get_exp()
pc.give_exp2(-ep)
timer("erfahrung", 15)
pc.setqf("antiexp", 1)
end
end
end
Genau so sieht meine aus die ich damals gemacht habe.Quote:
Hier mal eine besser quest die den Core nicht zu sehr belastet:
PHP Code:
quest anti_exp begin
state start begin
when kill with pc.getqf("exp_block")==1 and not npc.is_pc() begin
if pc.get_exp()>10000 then
pc.give_exp2(-pc.get_exp())
end
end
when 72501.use with pc.getqf("exp_block")==0 begin
chat("Ab jetzt bekommst du KEINE Exp mehr!")
pc.setqf("exp_block", 1)
end
when 72501.use with pc.getqf("exp_block")==1 begin
chat("Ab jetzt bekommst du wieder Exp!")
pc.setqf("exp_block", 0)
end
end