Jump to content

Jedzkie

Script Developers
  • Content Count

    632
  • Joined

  • Days Won

    4

Posts posted by Jedzkie


  1. After searching through kRO board and GRF, some of the extra things I found that is released by kRO:

    Achievement System

    Title System

    New Mapflags(To Allow/Disallow Creation/Disband/Changing Postions/Leaving Guilds)

    Mileage System

    Pet Evo(Some More INFO : hehe: Item Evolution needs some items and should not have any accessories weared and should be in friendly mode)

     

    Achievement? o_O


  2. How can I modify the HP of these? I know they are based off of the skill's level but for some reason I can't find where in the source they are. I found something related to the Silversniper, but It took me a while to get it to work without it also modifying the HP of Alchemist Plants/Marhine Sphere so I'm assuming there is a better way to do it. Also, this didn't affect the Magic Decoys at all.

     

    in db/re/mob_db.txt

     

     
    // Mechanic Fixed Autonomous Weapon Platforms
    2042,SILVERSNIPER,Silver Sniper,Silver Sniper,100,4500,0,0,0,9,390,0,80,10,10,60,10,10,120,10,10,12,1,0,20,0x84,2000,504,1020,360,0,0,0,0,0,0,0,999,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    2043,MAGICDECOY_FIRE,Magic Decoy,Magic Decoy,100,2500,0,0,0,7,195,0,16,60,10,10,10,100,60,10,10,12,1,0,23,0x84,2000,504,1020,360,0,0,0,0,0,0,0,999,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    2044,MAGICDECOY_WATER,Magic Decoy,Magic Decoy,100,2500,0,0,0,7,195,0,16,60,10,10,10,100,60,10,10,12,1,0,21,0x84,2000,504,1020,360,0,0,0,0,0,0,0,999,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    2045,MAGICDECOY_EARTH,Magic Decoy,Magic Decoy,100,2500,0,0,0,7,195,0,16,60,10,10,10,100,60,10,10,12,1,0,22,0x84,2000,504,1020,360,0,0,0,0,0,0,0,999,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    2046,MAGICDECOY_WIND,Magic Decoy,Magic Decoy,100,2500,0,0,0,7,195,0,16,60,10,10,10,100,60,10,10,12,1,0,24,0x84,2000,504,1020,360,0,0,0,0,0,0,0,999,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

  3. Hi! is it possible to make the quest system of Ragnarok is checking the level gap of the party members? for example.. i have a level 10 and joined a party of lvl 99, the kill of level 99 will not add kill of quest of level 10 unless they are not 10 levels gap. some of my players abuse this settings.. thanks! and i hope you can help me on this problem! specially AnnieRuru :D


  4. Hi! i already tried changing this:

     

    			// High Jobs, Babies and Third			for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){				if (strncmpi(message, pc->job_name(i), 16) == 0) {					job = i;					found = true;				}			}

     
    to this:
    			// High Jobs, Babies and Third			for( i = JOB_NOVICE_HIGH; i < JOB_MAX && !found; i++ ){				if (strncmpi(message, pc->job_name(i), 16) == 0) {					job = i;					found = true;				}			}

    Now, my problem is, i can still do job change to 3rd jobs.


  5.  

    Download: 1.1

    plugin <-- for those who knows how to install plugin

    or

    patch <-- for those who thinks plugin is pain

     

     

    create table maintenance (id int(11) primary key auto_increment,account_id int(11),name varchar(23),reason varchar(99),minlv2connect tinyint(4),order_time datetime,start_time datetime,end_time datetime) engine = innodb;
    .

    .

    Note : sometimes the server countdown jumps 1 second ahead

    this is normal because the timetick from time->add is unstable,

    so I use unix_time to synchronize the countdown to server time

     

    .


     

     

    so, if you found some script/source code having bugs and you need to shut down your server for a short while

    this is the source code you need

    @maintenance <Group ID can stay 1~99> <duration to kick in minute> <maintenance duration in minute> <reason>
    then a GM99 can commence the maintenance

     

    Example : '@maintenance 40 5 10 need to fix announcer script'

     

    every player with group ID 40 and below will be kick after 5 minutes

    and the server will start counting down by an announcement,

    during the maintenance of 10 minutes, group ID 40 and below will deny from login into the server

     

    `maintenance` table will also generate a new line, with the `reason` field as 'need to fix announcer script'

    which is useful to know when and how many times you did emergency server shutdown

    though, the actual reason for using SQL is to persist the data after server shutdown

    so the server will continue being in maintenance mode despite how many times you have shut down the server

    until the times up ( `end_time` field ), or do @maintenanceoff

     

    Note : you can't generate a new line using 'INSERT INTO' Sql syntax when server is on

    because I declare a bunch of variables to for them, for the purpose of saving memory consumption

    you have to login the game and type @maintenance to initiate the maintenance mode, otherwise it wont work.

    .

    .

    @maintenanceoff
    if you have already finished fixing the script/source code, and there's still a lot of time left

    you can type '@maintenanceoff' to immediately turn off the maintenance mode so players can login before the schedule

     

     


     

    -- Script commands --

    *maintenance <Group ID can stay 1~99>, <duration to kick in minute>, <maintenance duration in minute> { , <reason> };
    actually I have no idea why I wanna make a script command ... maybe just for fun ?

    .

    -	script	jsdfksdj	-1,{OnMon0255:	maintenance 40, 5, 60;	end;}
    this will make an announcement on Monday, 2:55AM that the server will have a regular server maintenance

    starts from 3AM to 4AM

    during that time, player with group ID 40 will be kicked and blocked from entering the server

    the `reason` field in `maintenance` table will be defaulted to '*Regular server maintenance*'

     

    maintenance 40, 5, 60, "系统保养";

    this will overwrite the `reason` field in `maintenance` table to '系统保养' instead of regular maintenance

    .

    .

    *maintenanceoff { <reason> };
    uhh ... useless I think ...

    .

    .

    *maintenancecheck( <type> );
    use 'maintenance()' to check the server is currently in maintenance mode or not

    return 0 if server is normal

    return 1 if server is going to have maintenance

    return 2 if server is having maintenance

     

    all other types are meant to myself to debug this junk

     

     

    1.0

    plugin

    patch

     

    1.1

    plugin

    patch

    --- change timer reset variable from 0 into INVALID_TIMER (-1)

    --- fix plugin when GM type '@maintenance' blank, it mentioned group id 0, should be showing the correct syntax

    --- also change 60-5-1 into 60-10-1 when announcing countdown

    --- change maintainance into maintenance hahaha, 4 of them

     

    Hi annie.. how can i change the announce color?


  6. So, you want a NORMAL npc to sell the item and restock it. But you want it done via Menu options and text.

    prontera,150,180,4    script    Stock_NPC    123,{switch( select( "Buy:Sell" ) ) {    case 1:        if( !$amount ){ mes "Sorry out of stock."; close; }        mes "Currently Selling: "+ getitemname($itemid) +"";        mes "Amount in stock: "+ $amount +"";        mes "Price per: "+ $price +"";        mes "How much would you like to buy?";        input .@purchase,1,$amount;        if ( zeny < ( .@purchase * $price ) ){ mes "Not enough funds."; close;}        zeny-= ( .@purchase * $price );        getitem $itemid,.@purchase;        $amount -= .@purchase;        next;        mes "Transaction Complete.";        close;    case 2:        mes "Currently Selling: "+ getitemname($itemid) +"";        mes "Amount in stock: "+ $amount +"";        mes "Sell back price: "+ ($price/2) +"";        mes "How much would you like to buy?";        input .@sell,1,10000;        if( countitem($itemid) < .@sell ){ .@sell = countitem($itemid); }        zeny += ( .@sell * ($price/2) );        delitem $itemid,.@sell;        $amount += .@sell;        next;        mes "Transaction Complete.";        close;}OnInitOnce:$itemid = 501; //Red Potion.$start_amount = 30000; // Amount available to start with.$price = 100; //Price per item.end;}

     

    OR

    Do you want it to work like an actual shop where you can buy the item, and it only restocks when that same item is sold back? (This can be emulated using a dynamic shop npc, bit more difficult but still very easy).

     

    Hi GMOcean, thanks for your time... the settings are ok, but i want like this, starting amount for buy is 30000.. selling is 0.. if i sell 1 Red Potion, the buy amount will deduct and the sell amount will increase.. vise versa.


  7.  

     

    You could have another NPC next to it to sell him the items and make the NPC trader resupply them. Or if the shop can be called with callshop (I doubt) you could make it all in one NPC.

     

    I'd make you an example, but honestly not in the mood.

     challenge accepted;

     

    prontera,150,160,6	script	HaiMarket	4_F_EDEN_OFFICER,{if(!$lock && !$stock) set $stock,30000;set $lock,1;set .item,512;set .price,10;if($stock){mes "I can sell "+ $stock +", how many do you wanna buy?";next;	while(input(.@guess, 1, $stock))	{		mes "[Woman]";		mes "Didn't you listen before? i can only sell up to "+ $stock;		next;	}	mes "[Woman]";	{	 .@cost = .@guess * .price;	if (Zeny<.@cost) {mes "you don't have enaf zeny"; close;}		set Zeny,Zeny-.@cost;		set $stock,$stock-.@guess;		getitem .item,.@guess;		mes "Well done.";	}	close;} else {	mes "no more";	close;}}

     

    is this what you want?

     

     

    Nope. Mainly because I think he actually wants to have the NPC with a shop interface. And he also wants the NPC to be able to buy your items and place them on stock, and the script doesn't do that.

     

    I don't know if you can call a trader via the callshop script command. In that case you could call it with both the buy and sell buttons and know exactly whatever you've sold or bought from him (see docs). In case you can't, it's not possible to the best of my knowledge to have it all in one NPC because of not being able to call the trader.

     

    I haven't attempted yet to call a trader shop, but won't test it right now. Could someone else please?

     

    Thanks for the replies but i want no a NPC Shop, only a npc with a dialog..


  8. Why not just use Hercules' official restock shop? It allows you to specify an item to sell and how much to sell. Then you can restock it after X amount of time, or after a certain time. Here is the example given with Hercules revisions.

    prontera,150,160,6	trader	HaiMarket	4_F_EDEN_OFFICER,{OnInit:	tradertype(NST_MARKET);	sellitem Red_Potion,-1,49;	end;OnClock0000://resupplies red potions on midnightOnMyResupply:	if( shopcount(Red_Potion) < 20 )		sellitem Red_Potion,-1,49;	end;}

    This sells 49 RedPotions at default price, and then at midnight, restocks those potions back to 49 if there are less than 20 left. So, to change it to your request would be, replace the 49 with 30000 and the 20 with a number less than 30000 so that it can get restocked.

     

    Edit: This can only be used with packetver 20131223 or newer. So make sure your using a compatible client first.

     

    i already tried it but it does not fit my needs.. -_- i want it buy and sell.. no time needed.


  9. Hi! can i request a stock npc? for example, the maximum stocks is 30000 if i buy a 1 Red potion worth 100z, the stocks will become 29999, then i will sell it by 50z. the stocks will become 30000 again.. thanks!


  10.  

     

    Gotta change 

    Orange_Potion

    by

    War_Badge

     

    Could use ID? even to add items

    Yes

     

     

    hanged by id does not work. 
    Have an example
    What does this npc?
    /* demonstrates Market Trader */prontera,150,160,6	trader	HaiMarket	4_F_EDEN_OFFICER,{OnInit:	tradertype(NST_MARKET);	sellitem Red_Potion,-1,49;	end;OnClock0000://resupplies red potions on midnightOnMyResupply:	if( shopcount(Red_Potion) < 20 )		sellitem Red_Potion,-1,49;	end;}

     

    What do you mean it does not work? you cannot click the npc?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.