Jump to content
  • 0

I need help with schedules npc


brenobaroni

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  03/02/13
  • Last Seen:  

I have a floating rates of noc , I would like him to start at a random time and ended one hour later, maybe two in two hours have a 30% chance of getting the event.

npc is here:

http://pastebin.com/pv6g3yBJ

Edited by brenobaroni
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  896
  • Reputation:   118
  • Joined:  05/23/12
  • Last Seen:  

Hello,

 

I've changed the script a lot but I rly dont know how do you want it "maybe two in two hours have a 30% chance of getting the event". Thereforce I've added an array where you can change the random time. I hope it will help you.

-    script    FloatingRates    -1,{

OnInit:
    //x minutes then stops(0),((Random)min. x minutes(1), max x minutes(2))
    setarray $@RateConf[0],120,60,180;
    goto L_Tick;
    end;

L_Tick:
    sleep2 rand($@RateConf[1],$@RateConf[2])*60000;
    goto L_Start;
    end;

L_Start:
    //Base(0),Job(1),Common(2),Heal(3),Use(4),Equip(5)    
    setarray $@Rates[0],550,550,550,550,550,550;
    setbattleflag("base_exp_rate",$@Rates[0]);
    setbattleflag("job_exp_rate",$@Rates[1]);
    setbattleflag("item_rate_common",$@Rates[2]);
    setbattleflag("item_rate_heal",$@Rates[3]);
    setbattleflag("item_rate_use",$@Rates[4]);
    setbattleflag("item_rate_equip",$@Rates[5]);
    atcommand "@reloadmobdb";
    announce "Sistema de rates flutuantes ativadas(duração de meia hora): 1."+($@Rates[0]-100)+"x 1."+($@Rates[1]-100)+"x 1."+($@Rates[2]-100)+"x",bc_all,0xFF6060;
    announce "Não afetam as cartas, digite @rates e confira! - Bom jogo a todos",bc_all,0xFF6060;
    sleep2 $@RateConf[0]*60000;
    goto L_End;
    end;

L_End:
    //Base(0),Job(1),Common(2),Heal(3),Use(4),Equip(5)    
    setarray $@Rates[0],500,500,500,500,500,500;
    setbattleflag("base_exp_rate",$@Rates[0]);
    setbattleflag("job_exp_rate",$@Rates[1]);
    setbattleflag("item_rate_common",$@Rates[2]);
    setbattleflag("item_rate_heal",$@Rates[3]);
    setbattleflag("item_rate_use",$@Rates[4]);
    setbattleflag("item_rate_equip",$@Rates[5]);
    atcommand "@reloadmobdb";
    announce "Rates flutuantes Finalizadas!.",bc_all,0xFF6060;
    announce "Bom jogo a todos!",bc_all,0xFF6060;
    goto L_Tick;
    end;
}

Rynbef~

Edited by Rynbef
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...