Jump to content
  • 0

Ban when specified numbers of clicks has done


Mr BrycE

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

brasilis,258,60,0 script School of Fish#1 844,{
if (isequipped(2764)) && (isequipped(2775)){
 specialeffect2 EF_BUBBLE;
 set .@fcast,18;
 if (isequipped(2550)) { //Fisher's_Muffler
  set .@fcast,.@fcast - 3;
 }
 if (isequipped(2443)) { //Fish_Shoes
  set .@fcast,.@fcast - 3;
 }
 progressbar "ffffff",.@fcast;
  if (rand(1,20) == 2) {
   getitem 6096,1; //Big Fish
   specialeffect EF_BUBBLE;
   mapannounce "brasilis","" + strcharinfo(0) + " has caught a Blue Fish!!!",bc_map,"0xff77ff";
   end;
  }
 set .@rhea_ran,rand(1,70);
 if (.@rhea_ran < 20) {
  getitem 579,1; //Fresh Fish
 }
 else if (.@rhea_ran == 20) {
  getitem 908,1; //Spawn
 }
 else if (.@rhea_ran == 21) {
  getitem 909,1; //Jellopy
 }
 else if (.@rhea_ran == 22) {
  getitem 963,1; //Sharp_Scale
 }
 else if (.@rhea_ran == 23) {
  getitem 956,1; //Gill
 }
 else if (.@rhea_ran == 24) {
  getitem 6049,1; //Marlin
 }
 else if (.@rhea_ran == 25) {
  getitem 918,1; //Sticky_Webfoot
 }
 else if (.@rhea_ran == 26) {
  getitem 960,1; //Nipper
 }
 else if (.@rhea_ran == 27) {
  getitem 910,1; //Garlet
 }
 else if (.@rhea_ran == 28) {
  getitem 938,1; //Sticky_Mucus
 }
 else if ((.@rhea_ran > 28) && (.@rhea_ran < 40)) {
  getitem 624,1; //Rotten Fish
 }
 else {
  mes "Nothing was caught.";
  close;
 }
 if (rand(1,200) == 3) {
  getitem 673,1; //Bronze Coin
  mapannounce "brasilis","" + strcharinfo(0) + " has caught a Bronze Coin!!",bc_map,"0x00ffff";
 }
 if (rand(1,500) == 3) {
  getitem 678,1; //Poison Bottle
  mapannounce "brasilis","" + strcharinfo(0) + " has caught a Poison Bottle!!",bc_map,"0x00ffff";
 }
 if (rand(1,3000) == 3) {
  getitem 6153,5; //Special Exchange Ticket
  mapannounce "brasilis","" + strcharinfo(0) + " has caught a 5pcs Special Exchange Tickets!!",bc_map,"0x44ff44";
 }
 end;
}
else {
 mes "Fishes are swimming in the water. I guess you need a Fishing Rod and a Bait";
 close;
}
}

hi i found this here in rathena, can anyone add a autoban when a certified item is always getting like the blue fish >.< we tried using WPE and its working im clicking it fast then getting a bluefish in just seconds, also, how to diffpatch anti WPE manually? T_T

Link to comment
Share on other sites

16 answers to this question

Recommended Posts


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

if i was right you problem is that users able to bypass the "casting" right ?

if yes then refer to this r15442

it would be a bad idea to do what you trying to reach....

it could be users bad luck for keep getting the same items over and over again...

who know ? it is a Rate ..Chances....no one can really assure or promise what you can get ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

yes, but the problem is, im having trouble putting it xD, will you tell me how to add it manually, like copy paste?

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:  

LOL....

src/map/npc.c

find this line...

sd->npc_idle_tick = gettick();
#endif

run_script_main(sd->st); 

and add this

/**
* WPE can get to this point with a progressbar; we deny it.
 **/
if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,gettick()) > 0 )
return 1;

at above of this line

run_script_main(sd->st);

then recompile...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

i cant find

sd->npc_idle_tick = gettick();
#endif
run_script_main(sd->st);

T_T

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:  

are you using rAthena ?

if yes then you can just simply update your revision...this has been included in new revision...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

eathena T_T, how can i addd this when im using eathena?

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:  

switch to rathena...... ==''

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

woah,! xD, i have 40+ players, will they be affected? if no im going to put all of my db's npc's in rathena, later tonight (Time Here: 11:56PM) , will it cause a WIPEOUT? sorrry too many questions xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

woah,! xD, i have 40+ players, will they be affected? if no im going to put all of my db's npc's in rathena, later tonight (Time Here: 11:56PM) , will it cause a WIPEOUT? sorrry too many questions xD

Yup Wipedout ,because eAthena and rAthena have different SQL Setup like main and logs

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:  

back up your stuff ......and ofcourse there are some different in SQL Table..perhap you should take a look on the structure of rAthena 1st..

install the rathena server as your test server ...use it until you familiar with it then only you switch...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

i think i need to study this 1st before doing such things, anyways thank you for the advices.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

For eAthena

Open npc.c find

int npc_scriptcont(struct map_session_data* sd, int id)
{
nullpo_retr(1, sd);
if( id != sd->npc_id ){
 TBL_NPC* nd_sd=(TBL_NPC*)map_id2bl(sd->npc_id);
 TBL_NPC* nd=(TBL_NPC*)map_id2bl(id);
 ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).n",
  nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id,
 nd?(char*)nd->name:"'Unknown NPC'", (int)id);
 return 1;
}

if(id != fake_nd->bl.id) { // Not item script
 if ((npc_checknear(sd,map_id2bl(id))) == NULL){
  ShowWarning("npc_scriptcont: failed npc_checknear test.n");
  return 1;
 }
}
run_script_main(sd->st);
return 0;
}

Replace

int npc_scriptcont(struct map_session_data* sd, int id)
{
nullpo_retr(1, sd);
if( id != sd->npc_id ){
 TBL_NPC* nd_sd=(TBL_NPC*)map_id2bl(sd->npc_id);
 TBL_NPC* nd=(TBL_NPC*)map_id2bl(id);
 ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).n",
  nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id,
 nd?(char*)nd->name:"'Unknown NPC'", (int)id);
 return 1;
}

if(id != fake_nd->bl.id) { // Not item script
 if ((npc_checknear(sd,map_id2bl(id))) == NULL){
  ShowWarning("npc_scriptcont: failed npc_checknear test.n");
  return 1;
 }
}

// WPE can get to this point with a progressbar; we deny it.
if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,gettick()) > 0 )
 return 1;
run_script_main(sd->st);
return 0;
}

And Recomplie your server

Edited by Napster
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

awtz, is this working?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

Yes your script use progressbar is begin

I think work :(

progressbar "ffffff",.@fcast;

if (rand(1,20) == 2) {

getitem 6096,1; //Big Fish

specialeffect EF_BUBBLE;

mapannounce "brasilis","" + strcharinfo(0) + " has caught a Blue Fish!!!",bc_map,"0xff77ff";

end;

}

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:  

the reason to apply that diff is because users found a way to bypass that "casting"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

phew, thas was a releif, thanks you, ill try it later when my players are all asleep xD

the reason to apply that diff is because users found a way to bypass that "casting"

so it means it is really working?

wohoo, it worked. thank you sir Napster! :(

Edited by Mr BrycE
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...