Jump to content
  • 0

monster of the week problem


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

I'm using this script

But when I set the monster for example to anubis while players have killed anubis BEFORE it became the week monster, the counter starts counting from there.

example: player has killed 20 anubis before it became monster of the week, when anubis became monster of week and a player kills a anubis, it'll start counting from 20, so the next kill would be 21/100. Also when the reward point is reached, this player wont get reward.

This player is now bugged forever with this monster, the counter wont reset even when weekly monster resets.

Does anyone know how to fix this please..?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Can you please post the script here?

Edit: I can see personperson49 has a MOTD script for rA here.

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Peopleperson's script is nice, but not exactly what I want. It does not give a reward and has no counter.

But I appreciate your effort for searching this! :)

Here is the script.


prontera,155,171,5 script Weekly Monster 437,{
mes "Current Weekly Monster Info :";
if ( getgmlevel() < 80 && $@WeeklyMobEvent == 0 ){
mes "There is No Weekly Monster Event now.";
close;
}
if ( $@WeeklyMobID == 0 ){
mes "^0000FFMonster^000000 : ^FF0000UNDECLARED MONSTERS^000000.";
}else{
mes "^0000FFMonster^000000 : ^FF0000"+getmonsterinfo($@WeeklyMobID,0)+"^000000.";
mes "^0000FFRequired^000000 : ^FF0000"+$@WeeklyKillAmount+"^000000 Kills.";
}
if ( $@WeeklyItemID == 0 ){
mes "^0000FFReward^000000 : ^FF0000UNDECLARED ITEMS^000000.";
}else{
mes "^0000FFReward^000000 : "+$@WeeklyAmount+" x ^FF0000"+getitemname($@WeeklyItemID)+"^000000.";
}
next;
if ( getgmlevel() < 80 ){
mes "I only serve for GM above level 80.";
close;
}else{
mes "How can i serve for you ..?";
}
next;
switch(select("CLOSE:^0000FFNEW SETTINGS^000000")) {
Case 1: 
mes "Come back when you are going to do new settings again.";
close;
Case 2:
do{
mes "Please Input the Monster ID.";
mes "^FF0000Example : 1002 = Poring^000000";
input $@WeeklyMobID,1001,32767;
next;
}
while( getmonsterinfo($@WeeklyMobID,0) == "null" );
do{
mes "Please Input Required Kills.";
mes "^FF0000Example : 100 = 100 Kills";
input $@WeeklyKillAmount,1,100000;
next;
}
while( $@WeeklyKillAmount == 0 );
do{
mes "Please Input Rewards when finished.";
mes "^FF0000Example : 909 = Jellopy";
input $@WeeklyItemID,501,32767;
next;
}
while( getitemname($@WeeklyItemID) == "null" );

do{
mes "Please Input Amount Of Rewards.";
mes "^FF0000Example : 100 = 100 each";
input $@WeeklyAmount,1,30000;
next;
} 
while( $@WeeklyAmount == 0 );
mes "New Settings has been Applied.";
close2;
set $@WeeklyMobEvent,1;
announce "[Weekly Monster] : "+$@WeeklyKillAmount+" each "+getmonsterinfo($@WeeklyMobID,0)+" ",0;
announce "[Weekly Monster Reward] : "+$@WeeklyAmount+" each "+getitemname($@WeeklyItemID)+" ",0;
end;
}

OnNPCKillEvent:
if ( $@WeeklyMobEvent != 1 || killedrid != $@WeeklyMobID ) end;
set #WeeklyKill,#WeeklyKill+1;
if ( #WeeklyKill == $@WeeklyKillAmount ){
mes "You have Finished the Weekly Monster Event.";
mes "And you have been rewarded with...";
mes "^FF0000"+$@WeeklyAmount+" each "+getitemname($@WeeklyItemID)+"^000000";
set #WeeklyKill,0;
getitem $@WeeklyItemID,$@WeeklyAmount;
close;
}else{
dispbottom "[Weekly Monster] : Killed [ "+#WeeklyKill+" / "+$@WeeklyKillAmount+" ] of [ "+getmonsterinfo($@WeeklyMobID,0)+" ]";
end;
} 

}

Edited by HristDead
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

You can try adding a query_sql select all #WeeklyKill to 0 before/after the line announce.

query_sql("UPDATE `global_reg_value` SET value=`0` WHERE str=`#WeeklyKill`");

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

it can only be countered by setting another variable, like #WeeklyKillID

example,

when a new week started and monster ID changed,

set $@WeeklyKilllID, rand(2000000000);

and do a check on player inside OnNPCKillEvent after initial if... check

if ( $@WeeklyKillID != #WeeklyKillID ) {

set #WeeklyKill, 0; set #WeeklyKillID, $@WeeklyKillID;

}

since this is Emistry's script, I believe he should be able to do something like this

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

your

do {
< all >
if ( getgmlevel() > x ) ....
< higher gm level >
} while ( getgmlevel() > x )

my usual method

while (1) {
< all >
if ( getgmlevel() < x ) close;
< higher gm level >
}

it seems you got yourself a sifu on your side ....

curious ... I'm still guessing who is it ... /hmm

==================================================

nope,

OnInit:
OnSun0001:
do{
setarray .Monster[0],rand(1001,2380),100;
}while( getmonsterinfo( .Monster[0],0 ) == "null" );
set .eventID, rand(2000000000); // <-- add this
set .GMLevel,60;
end;

and change this

if( #MOBID != .Monster[0] ){
set #MOBID,.Monster[0];
set #AMOUNT,0;
}

into this

if ( #MOTW_ID != .eventID )
set #AMOUNT, 0;

get rid of the #MOBID entirely, its not needed

because the topic starter said if it somehow random back into same mob ID

<-- today .Monster[0] is Isis and tomorow .Monster[0] is Isis again

using if( #MOBID != .Monster[0] ) comparison will not work in this case

if you think there's in 1/2000000000 chances that will get same event ID

also can do it by increasing counter,

set .eventID, .eventID +1;

PS: I wonder is eventID++ works currently

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Personally, I'd use the ' set .eventID, .eventID +1; ' since it changes only once a week. Thus allowing for 2.5b+ weeks when using this method. And considering 50weeks/yr, it won't even reach its end before the server owner dies of old age, heck you can have 10,000 server owners living up to 100 years, and it'd still be growing strong lol. It's what i used in my Disguise Event NPC, and there have yet to be any issues regarding same event counters.

@OffTopic:

Welcome back Annie. I'm farily interested to see what kind of scripts you'll make using any new methods you learned / thought of in your absence.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

So what do i have to do? which script will fix this problem?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

You can use any of their workaround, it will give different ID of the event ongoing. So when PC kill mob it will check if event ID is current event.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Ok sir thanks, but where do i put that part?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...