Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- add to item_db2.sql
- // Mining Pickaxe
- INSERT INTO `item_db2` VALUES (3500, 'Pickaxe_', 'Pickaxe', 4, 30000, NULL, 100, NULL, 0, NULL, 0, 4294967295, 7, 2, 128, NULL, 0, 0, 0, NULL, NULL, NULL),
- INSERT INTO `item_db2` VALUES (3501, 'Super_Pickaxe_', 'Super Pickaxe', 4, 30000, NULL, 100, NULL, 0, NULL, 0, 4294967295, 7, 2, 128, NULL, 0, 0, 0, NULL, NULL, NULL);
- // Energy Potion
- // Description : Restores Energy by 5
- INSERT INTO `item_db2` VALUES (3503,'S_Energy_Potion','Small Energy Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set #ENERGY, #ENERGY+5; if ( #ENERGY > #MAX_ENERGY ) set #ENERGY, #MAX_ENERGY; callfunc "energy_check"; specialeffect2 EF_HEAL;',NULL,NULL);
- // Description : Restores Energy by 10
- INSERT INTO `item_db2` VALUES (3504,'M_Energy_Potion','Medium Energy Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set #ENERGY, #ENERGY+10; if ( #ENERGY > #MAX_ENERGY ) set #ENERGY, #MAX_ENERGY; callfunc "energy_check"; specialeffect2 EF_HEAL;',NULL,NULL);
- // Description : Restores Energy by 15
- INSERT INTO `item_db2` VALUES (3505,'L_Energy_Potion','Large Energy Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set #ENERGY, #ENERGY+15; if ( #ENERGY > #MAX_ENERGY ) set #ENERGY, #MAX_ENERGY; callfunc "energy_check"; specialeffect2 EF_HEAL;',NULL,NULL);
- // Description : Restores Energy to full
- INSERT INTO `item_db2` VALUES (3506,'F_Energy_Potion','Full Energy Potion',0,50,NULL,70,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set #ENERGY, #MAX_ENERGY; callfunc "energy_check"; specialeffect2 EF_HEAL;',NULL,NULL);
- === Normal Pickaxe Drop rates
- Oridecon 70%
- Elunium 70%
- Bradium 50%
- Carnium 50%
- HD Carnium 20%
- HD Bradium 20%
- HD Oridecon 20%
- HD Elunium 20%
- Enriched Oridecon 10%
- Enriched Elunium 10%
- Charcoal - Replace to Black Magic Stone 10%
- Cursed Magical Stone 10%
- ** 5 Seconds mining time
- ** 20% chance no energy consume
- == Donate Pickaxe Drop rates (+10%)
- Oridecon 80%
- Elunium 80%
- Bradium 60%
- Carnium 60%
- HD Carnium 30%
- HD Bradium 30%
- HD Oridecon 30%
- HD Elunium 30%
- Enriched Oridecon 20%
- Enriched Elunium 20%
- Charcoal - Replace to Black Magic Stone 20%
- Cursed Magical Stone 20%
- ** 2 Seconds mining time
- ** 50% chance no energy consume
- */
- function script energy_check {
- dispbottom "Current Energy : [ "+#ENERGY+" / "+#MAX_ENERGY+" ]", 0x06e5ff;
- return;
- }
- - script Energy_System -1,{
- OnInit:
- // How much energy will player gain?
- .gain_energy = 1;
- // @energy to check your current energy..
- bindatcmd "energy", strnpcinfo(0)+"::OnCheckEnergy";
- // Initial energy.
- .energy = 50;
- initnpctimer;
- end;
- OnPCLogoutEvent:
- #LOGOUT_ENERGY = gettimetick(2);
- end;
- OnPCLoginEvent:
- if ( #MAX_ENERGY != .energy ) #MAX_ENERGY = .energy;
- if ( #LOGOUT_ENERGY ) {
- .@time = gettimetick(2) - #LOGOUT_ENERGY;
- if ( .@time > 3600 * 2 ) {
- .@gain = .@time / 3600 * 2;
- #ENERGY += .@gain;
- if ( #ENERGY >= #MAX_ENERGY ) #ENERGY = #MAX_ENERGY;
- }
- }
- OnCheckEnergy:
- energy_check;
- end;
- OnTimer120000:
- foreachinserver strnpcinfo(0)+"::OnSGainCheck";
- setnpctimer 0;
- end;
- OnSGainCheck:
- .@gain = .gain_energy;
- if ( !checkvending() ) {
- #ENERGY += .@gain;
- if ( #ENERGY >= #MAX_ENERGY ) #ENERGY = #MAX_ENERGY;
- }
- end;
- }
- - script mine_spot -1,{
- .@equipid = getequipid(EQI_ACC_L);
- if ( .@equipid < .pickaxe[0] || .@equipid > .pickaxe[1] ) {
- message strcharinfo(0),"I must equip a pickaxe to mine here!";
- end;
- }
- if ( .@equipid == .pickaxe[0] ) {
- .@time = 5; // 5 sec casting
- .@consume = 20; // 20% no consume
- .@amount = 2; // 2 drops
- } else if ( .@equipid == .pickaxe[1] ) {
- .@bonus = 1000; // +10% drop rate if super pickaxe
- .@time = 2; // 3 sec casting
- .@consume = 50; // 50% no consume
- .@amount = 4; // 4 drops
- }
- explode(.@T$,.dropData$,",");
- do{
- if ( #ENERGY < 1 ) {
- showscript "Insufficient energy.", getcharid(3);
- dispbottom "I need more energy to mine.", 0xff0000;
- end;
- }
- progressbar "", .@time;
- explode(.@TT$,.@T$[rand(getarraysize(.@T$))],":");
- .@itemid = atoi(.@TT$[0]);
- .@rate = atoi(.@TT$[1]) + .@bonus;
- if ( .@consume <= rand(100) ) --#ENERGY;
- energy_check;
- if( .@rate >= rand(0,10000) ) {
- specialeffect 51;
- specialeffect2 610;
- showscript getitemname(.@itemid)+" found!",getcharid(3);
- getitem .@itemid, .@amount;
- end;
- }
- specialeffect2 611;
- showscript rand(2) ? "Nothing found..." : "Try again...",getcharid(3);
- } while(1);
- end;
- OnInit:
- .pickaxe[0] = 3500; // normal pickaxe id
- .pickaxe[1] = 3501; // super pickaxe id
- .dropData$ = "984:7000,985:7000,6223:5000,6224:5000,6225:2000,6226:2000,6240:2000,6241:2000,7619:1000,7620:1000,7892:500,6307:500,6307:300";
- }
- // Add more duplicates
- anthell01,47,254,1 duplicate(mine_spot) Mining Spot#001 1907
- anthell01,43,241,1 duplicate(mine_spot) Mining Spot#002 1908
- anthell01,53,235,1 duplicate(mine_spot) Mining Spot#003 1907
- anthell01,60,236,1 duplicate(mine_spot) Mining Spot#004 1908
- anthell01,66,229,1 duplicate(mine_spot) Mining Spot#005 1907
- anthell01,65,222,1 duplicate(mine_spot) Mining Spot#006 1908
- anthell01,81,209,1 duplicate(mine_spot) Mining Spot#007 1907
- anthell01,99,230,1 duplicate(mine_spot) Mining Spot#008 1908
- anthell01,97,242,1 duplicate(mine_spot) Mining Spot#009 1907
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement