MOB Reward

uzami

New member
Messages
21
Points
0
Github
Uzami
Hello, i'm making some achivments for my server and ther is one that already workings, the script gives a player one item when they get Job Level 10 by mail, and display a message and etc. Anyway, a friend makes it for my. But, I want make one that everytime a Player kills 1000 Porings, he will recive one mail (on the game) with an item, zenys and display a message and show a cuttin on the botton, just like this:

-    script    Mail    -1,{
    OnPCJobLvUpEvent:
    if(JobLevel == 10 && v_earn_beta == 0) {
        set .@send_name$, "Vision Server";
        set .@dest_name$, strcharinfo(0);
        set .@dest_id, getcharid(0);
        set .@title$, "Jogador Beta";
        set .@zeny, 10000;
        set .@item, 2576;
        set .@qtd, 1;
        set .@message$, "Parabéns! Você é oficialmente um "+.@title$+". Pegue uma Mochila do Jogador Beta e "+.@zeny+" zeny por seus feitos.";
        dispbottom "Uma conquista foi desbloqueada! Confira sua caixa de correio.";
        callfunc   "F_sendmail",.@send_name$,0,.@dest_name$,.@dest_id,.@title$,.@message$,0,.@zeny,.@item,.@qtd,0,0,1,0,0,0,0;
        set v_earn_beta, 1;
        end;
    }
    end;
}
 
any help? XD
 
OnNPCKillEvent:
if (killedrid != 1002) end;
porings_killed++;
if(porings_killed % 1000 == 0) {
// Your achievements code here.
}
end;

Something like this.

 
Okay, works perfectly! Thx u!

But... 2 things haha

First, ther's any way that only happens one time for account? cuz I kill 1000 porings, and thats ok, but, when I kill 1000 more, i recive the achivment again, and again haha

i don't know, maybe with a sql query? 

Seconds, ther's a way to show a cutting, with the messeng? like: "dispbottom "You have unlock an Achivment! Check your mail box."; and then, show a cuttin 003.bmp that I put on my illust folder for maybe... 5 seconds?

Thx again
default_biggrin.png


 
OnNPCKillEvent:
if (killedrid != 1002) end;
porings_killed++;
if(porings_killed % 1000 == 0) {
if(porings_killed == 1000) {
// Your achievement code here.
dispbottom "You have unlock an Achivment! Check your mail box.";
cutin "003",2;
}
// Your reward code here. Before sleep2


// After 5 seconds clear any cutin
sleep2 5000;
cutin "", 255;
}
end;

After killing first 1000 porings player gain achievement and reward. After any next 1000 - only reward, without achievement.

 
Last edited by a moderator:
Back
Top