i need help ")

10/21/2020 21:55 000000a#1
Hi Everyone I need help ..

i make this quest for killing players to get exp

PHP Code:
quest npc_exp begin
    state start begin 
        when kill with npc
.is_pc() begin
        pc
.give_exp2(500000000)
        
end
    end
end 

But I forgot to add the IP condition this pc.get_ip or something like that

if anyone can edit the quest please do this for me <3

Thanks.
10/22/2020 19:03 xTryhardx#2
Code:
quest kill begin
    state start begin
		when kill with npc.is_pc() begin
			local vid = npc.get_vid()
			local old_pc = pc.select(vid)
			if old_pc ~= 0 then
			local e_ip = pc.get_ip()
			local e_name = pc.get_name()
			pc.select(old_pc)
			local m_ip = pc.get_ip()
			local m_name = pc.get_name()
				
				if e_ip == m_ip then
					syschat("You can't kill yourself!")
				else
				pc.give_exp2(500000000)
				end
			end
		end
	end	
end
10/23/2020 14:57 cypher#3
Please use the collection thread for quests next time:
[Only registered and activated users can see links. Click Here To Register...]

#closed