Jump to content

serakh00

Members
  • Posts

    53
  • Joined

  • Last visited

Posts posted by serakh00

  1. id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item
    Don't devide by 10 there that is the buy value just use the code I sent you. In my server I did it /5 to make zeny harder to farm as well, but I left quest zeny alone to make quest more valuable.

     

     

    Thank for helping me  /no1

     

    mark as solved

  2. Following my thread : https://rathena.org/board/topic/107241-zeny-redenomination-system/?p=308164

    if i want to edit zeny add/reduction via scriptcommand : "Set Zeny" or "Zeny = Zeny+X" to only half value,

    which part of source code i must edit?

    example :

    The script goes this :

    Zeny = Zeny+10000000; //1M Zeny

    but instead of giving 1M zeny, player get 500,000 zeny (halfed). aka. redenomination.
    And i want this only applied for Zeny, not the rest of variables/parameter. Editing via ALL NPC files is pain. If possible, please help me via source editing

     

    Thanks rAthena

  3. {
        Id: 969
        AegisName: "Gold"
        Name: "Gold"
    change this ->    Buy: 20000
        Weight: 200
        BuyingStore: true
    },
    
    You have to change each item from your self i think in the item_db the same is for quest just search for the quest npc and change the value

    yeah realize that, but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.

    in itemdb.c

    change

    	//When a particular price is not given, we should base it off the other one
    	//(it is important to make a distinction between 'no price' and 0z)
    	if ( str[4][0] )
    		id->value_buy = atoi(str[4]);
    	else
    		id->value_buy = atoi(str[5]) * 2;
    
    	if ( str[5][0] )
    		id->value_sell = atoi(str[5]);
    	else
    		id->value_sell = id->value_buy / 2;
    
    to

    	//When a particular price is not given, we should base it off the other one
    	//(it is important to make a distinction between 'no price' and 0z)
    	if ( str[4][0] )
    		id->value_buy = atoi(str[4]);
    	else
    		id->value_buy = atoi(str[5]) * 10;// [Stolao]
    
    	if ( str[5][0] )
    		id->value_sell = atoi(str[5]);
    	else
    		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]
    
    as for quest you'll have to manually edit the quests

    don't forget to recompile

    i done with this and somehow it cut the price by 60% and if i make NPC that sell an item and make the price 1,000,000 it doesn affected.

    is there another method for cutting the price of script defined-price shop via source?

    Thanks for helping

    Code I did will only effect item with no sell price (most of the db) anything custom where you define the sell value will sell at the define value

    Ie if you make a custom coin that buys for 20000 and sells for 10000 it will sell for 10000 but if you set buy as 20000 but leave sell blank it will sell for 4000.

    On phone so can't leave codes easily

     

    Based on your clue this what i've done

     

    npc.c

    	if (value  > 1 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) {
    			value = value/10;
    			if (value == 0) value=1; //+1 to avoid selling free item
    		}
    		if( value < 0 ) {
    			if (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP) value = id->value_buy;
    			else value = 0; // Cashshop doesn't have a "buy price" in the item_db
    		}
    		if (value == 0 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) { // NPC selling items for free!
    			ShowWarning("npc_parse_shop: Item %s [%hu] is being sold for FREE in file '%s', line '%d'.\n",
    				id->name, nameid2, filepath, strline(buffer,start-buffer));
    
    itemdb.c

     

    	//When a particular price is not given, we should base it off the other one
    	//(it is important to make a distinction between 'no price' and 0z)
    	if ( str[4][0] )
    		id->value_buy = atoi(str[4])/10+1;
    	else
    		id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item
    	if ( str[5][0] )
    		id->value_sell = atoi(str[5])/10;
    	else
    		id->value_sell = id->value_buy / 20;
    
    Checked and item price in shop NPC/selling item to NPC are divided by 10.

    Please tell me if this src edit is wrong / dangerous.

    i attached my  screenie :

    post-2188-0-66813200-1472859576_thumb.png

  4. {
        Id: 969
        AegisName: "Gold"
        Name: "Gold"
    change this ->    Buy: 20000
        Weight: 200
        BuyingStore: true
    },
    
    You have to change each item from your self i think in the item_db the same is for quest  just search for the quest npc  and change the value

     

     

    yeah realize that,  but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.

     

    in itemdb.c

    change

    	//When a particular price is not given, we should base it off the other one
    	//(it is important to make a distinction between 'no price' and 0z)
    	if ( str[4][0] )
    		id->value_buy = atoi(str[4]);
    	else
    		id->value_buy = atoi(str[5]) * 2;
    
    	if ( str[5][0] )
    		id->value_sell = atoi(str[5]);
    	else
    		id->value_sell = id->value_buy / 2;
    

    to

     

    	//When a particular price is not given, we should base it off the other one
    	//(it is important to make a distinction between 'no price' and 0z)
    	if ( str[4][0] )
    		id->value_buy = atoi(str[4]);
    	else
    		id->value_buy = atoi(str[5]) * 10;// [Stolao]
    
    	if ( str[5][0] )
    		id->value_sell = atoi(str[5]);
    	else
    		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]
    

    as for quest you'll have to manually edit the quests

    don't forget to recompile

     

    i done with this and somehow it cut the price by 60% and if i make NPC that sell an item and make the price 1,000,000 it doesn affected.

    is there another method for cutting the price of script defined-price shop via source?

     

    Thanks for helping

  5. I was thinking about economy-friendly world in ragnarok. And lead me to think what if everything in the game is subject of "pricecut"?

    Let say we have 1:10 zeny redenomination, i will turn :

    -Zeny from selling "gold" from 100,000 down to 10,000z.

    -An item which sold by npc for 2,000,000z down to 200,000z.

    -A quest which gives 30,000z to 3,000z.

    -Player will think Zeny is more precious thing than before.

    All changes are made without any value edit in DB/npc script.

    But due to lack of my knowledge in source, i beg to someone here for creating this system. Hope this system will be usefull for other people too..

    Thanks rAthena.

  6. Since the new instance system is implemented, many of my players experienced "stuck in portal" inside an instance.

     

    The could walk through the portal without being warped. Rarely, the could enter the portal after several minutes.

     

    hope someone can help me

     

    thanks

  7. prontera,150,180,5	script	ujiono	56,{
    	getmapxy .@map$,.@x,.@y, 1;// XY npc sample
    	for ( .@i = -4; .@i <= 4; .@i++ )// x
    		for ( .@j = -4; .@j <= 4; .@j++ )// y
    			if ( checkcell( .@map$, (.@x+.@i), (.@y+.@j), cell_chkpass ) ) {// can pass
    				.@cell_x[.@size] = .@x+.@i;
    				.@cell_y[.@size] = .@y+.@j;
    				.@size++;
    			}
    	.@r = rand( .@size );// random index
    	makeitem 501,1,.@map$,.@cell_x[.@r],.@cell_y[.@r];
    }
    

    try it later

    thanks master..

  8. i want to spawn items in area within 4x4 cell from monster dead location using scriptcommand *makeitem

     

    Currently i manually add coordinate using getmapxy, but it only 2x2 cell consider how long i must write each coordinate (eg: x,y;  x-1,y;  x+1,y)

     

    is there any easier way to point each coordinate within 4x4 cell?

  9. Hi i'm following the steps to enter with the loki launcher I diffed the 20130605 client and in my clientinfo.xml changed to version 37, also I compiled rathena with definepacket version 20130605 but I'm having an error it seems that the launcher doen't send the user and pass because in the login server is in "blank" I attached an image. PLease Help!

     

    Solved /meh

     

    now I get an error message when entering

     

    error02.jpg

     

    and also I setup a better resolution and mouse freedom but the settings dont change I get a Little window to play

     

    error03.jpg

     

    setup01.jpg

     

    What am I doing wrong?

     

    same here..i have to manually resize the resolution by looking up into optioninfo.lua

    using the latest revision of lua files

  10. it wont work ...it you didnt specify the delimiter...it will not break the string ..

     

    CyG5vyc.jpg

     

     

     

    but you can do like this ... using the charat

     

    D6piiLI.jpg

    ok i got it

    thanks emisrty..

     

     

     

     

    explode (@myvar2$,@myvar$,"")

    does it copy each letter in @myvar$ into single index of @myvar2$ ?

    Nice try xD however empty string is not a valid delimiter

     

    haha i though it will explode each letter even if delimiter is empty

  11. so here is my confusion :

    i have a string variable

    set @myvar$,"rathena";

    then use explode

    explode (@myvar2$,@myvar$,"")

    does it copy each letter in @myvar$ into single index of @myvar2$ ?

    @myvar2[0]=r

    @myvar2[1]=a

    @myvar2[2]=t

    and so on ???

    thaks before and sorry for my bad english..

  12. i used 2013-06-05 client,

     

    set my packetver to 20130605 in mmo.h then compiled

    used :

    <version>39</version>

    <langtype>0</langtype>
     
    in clientinfo/xml

     

    i passed the login part but when selected char, i got message "Your game exe is not latest"

     

    on my map server  i got warning : Rejected connection attempt, forbidden packet version (AID/CID: '2000001/150001', Packet Ver: '38', IP: '127.0.0.1')

     

    what should i do?

×
×
  • Create New...