PointSystem [TEST_QUEST]

10/03/2011 18:42 TheDestroyer™#1
hello epvp,
its point system i write just for test
first add to it in /home/../quest/questnpc.txt :
1093 boss1
and its quest :
PHP Code:
------------------------------------------------------------------
---- 
test quest of point system
---- questnpc.txt 
---- 
1093 boss1
------------------------------------------------------------------        
quest test_point begin
        state start begin
                when login begin
                    chat
("your point : "..pc.getqf("point"))
                
end -- s

                when letter begin
                    send_letter
("Get Item of point system")
            
end
                when button 
or info begin
                        
if pc.getf("point") == 20 then
                    say_title
("Your Point : 20 anymore!")
                    
say("Please select your gift : ")
                    
say("")
                    ----
"12345678901234567890123456789012345678901234567890"|
                    
                            
local s select("TestItem1","TestItem2","Close"
                            
                            if 
1==s then
                        say_title
("Okey")
                        
pc.give_item2(1)
                        
pc.setf("point",pc.getf("point")-20)
                        
clear_letter()
                            elseif 
1==s then 
                        say_title
("Okey")
                        
pc.give_item2(2)
                        
pc.setf("point",pc.getf("point")-20)
                        
clear_letter()
                            else
                        
say_title("Bye...")
                        
say("")
                        
say("")
                        ----
"12345678901234567890123456789012345678901234567890"|
                        
say("Bye...")
                
end -- s
            end 
-- else
        
end -- elseif
        
                
when boss1.kill begin
                    pc
.setf("point",pc.getf("point")+1)
                
end -- s
            end 
-- w
                end 
-- 
10/03/2011 18:46 √π.#2
will not work

btw: you can only buy an item with exactly 20 coins? what you want to do if someone has 21?
10/03/2011 18:50 TheDestroyer™#3
give me 50 € i'll get screen for you :D:D:DD
10/03/2011 18:53 √π.#4
you bet 50€?
[Only registered and activated users can see links. Click Here To Register...]
10/03/2011 18:59 IRoxasI#5
xD das ist naja im Grunde nichts... das passt ja kaum was...
z.b.
muss es elseif 2==s then heißen und nicht wieder 1... naja
10/03/2011 19:02 iYoshix3#6
Ist ähnlich aufgebaut wie meine Ingame Coins Quests, die ich mal pub. gemacht habe.
Nur heit es da Ingame Special Points ;)

Mfg
10/03/2011 19:44 Prσfizσcker94#7
Schlecht gemacht, da die Coins nur Char und nicht Accountübergreifend sind. Vielleicht mache ich irgendwann mal ein Teil meines Itemshops pub.

Lg
10/03/2011 19:56 ZyoX#8
Quest wird nicht funktionieren, da paar ends fehlen.
Accountübergreifende Punkte wäre sinnvoller (auslesbar z. B. aus der DB).
10/03/2011 20:38 JoinClup#9
vn its just test quest and if 1==s that codes true .d
10/04/2011 00:37 iYoshix3#10
pc.get_accound_id() oder wie der befehl heißt, einfach

game.set_event_flag((""..pc.get_account_id().."coi ns"), 20)

usw.
10/30/2011 11:50 TheDestroyer™#11
mfg thedestroyertm
thank you

Quote:
Originally Posted by √π. View Post
will not work

btw: you can only buy an item with exactly 20 coins? what you want to do if someone has 21?
its test if sameone has 21 , he get nothing , if i want to it , i can add :

20 , 50 , 100 points
and when sameones has 100 coins he/she has not choose just get surprise selection.