Jump to content

Quests, Games: FIXED*Slot Machine + Bevarage Vending Machine (Simulate Vending Machine System)


Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

File Name: FIXED*Slot Machine + Bevarage Vending Machine (Simulate Vending Machine System)

File Submitter: yuchinin

File Submitted: 08 Feb 2016

File Category: Games, Events, Quests

Content Author: Yuchinin


//===== rAthena Script =======================================//= Slot Machine + Bevarage Vending Machine (Simulate Vending Machine System)//===== By: ==================================================//= Yuchinin//===== Current Version: =====================================//= 1.1//===== Compatible With: =====================================//= rAthena Project//===== Description: =========================================//= A custom slot machine and vending machine I make few years ago.//= Using my Simulate Vending Machine System//= Need to insert coin to operate.//= It can also eject remaining coin for you.//= [ Note ] This is an rewrite from GmOcean Slot Machine.//= Part of the slot machine code are credited to GMOceon.//=====******** Note ********=================================//= This script need my release of://= 1. Common Useful Function (common.txt)//= Better let it load first before adding my other script.//= 2. You must also add vendingMachine.grf to your DATA.ini else it will not working properly//= 3. [Note] Some of the item data has been change ( 673,677,674,11506 ~ 11512 )//===== Additional Comments: =================================//= 1.0 Initial release.//= 1.1 Fixed F_Beverage function not found error and also add the iteminfo description file//============================================================



Click here to download this file

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   189
  • Joined:  11/27/11
  • Last Seen:  

I'll use it thanks for this !

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

New version updated!
Sorry about the missing function on the previous version. /sry 
Fixed F_Beverage function not found error and also add the description file :) 

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

Hi @yuchinin,

I'm Having a missing file which is also not included on your grf.

image.png.5a0372ecd79e849a2925e1990567870d.png

Also,

Can you teach me how to remove Zeny on vending machine and slot machine ?

image.png.93d27fdb0496f7a0cc5f3d3a95b7d402.pngimage.png.1799bf5de1b7fe836cb3bc8764b96727.png 

Would love to have it all coin. :) 

 

 

 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

11 hours ago, rmon said:

Hi @yuchinin,

I'm Having a missing file which is also not included on your grf.

image.png.5a0372ecd79e849a2925e1990567870d.png

Also,

Can you teach me how to remove Zeny on vending machine and slot machine ?

image.png.93d27fdb0496f7a0cc5f3d3a95b7d402.pngimage.png.1799bf5de1b7fe836cb3bc8764b96727.png 

Would love to have it all coin. :) 

 

 

 

 

I didn't use any custom graphic on vending machine, all item are using kro default item sprite so consider update your client file if you haven't do that.
To remove the coin, just select the "Eject Coin" to eject all coin.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

15 hours ago, yuchinin said:

I didn't use any custom graphic on vending machine, all item are using kro default item sprite so consider update your client file if you haven't do that.
To remove the coin, just select the "Eject Coin" to eject all coin.

I am using fresh copy of English translation from https://github.com/zackdreaver/ROenglishRE 

My KRO Client also updated (11-03-2017) for both rsu-kro-rag-lite and rsu-kro-renewal-lite

But still getting the error.

image.png.5a0372ecd79e849a2925e1990567870d.png

--------------------------------------------------------------------------

its the zeny that i want to remove since the script is not doing anything on the zeny 

--------------------------------------------------------------------------

Also,

Can you assist me on the below screenshot ? as the links for the items is stacking up.

I have diff settings for the below

20 Extend Chat Box
21 Extend Chat Room Box
22 Extend PM Box

image.png.732d63790c3bd638950dd90c0ee0fa05.png

Edited by rmon
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

11 hours ago, rmon said:

I am using fresh copy of English translation from https://github.com/zackdreaver/ROenglishRE 

My KRO Client also updated (11-03-2017) for both rsu-kro-rag-lite and rsu-kro-renewal-lite

But still getting the error.

image.png.5a0372ecd79e849a2925e1990567870d.png

--------------------------------------------------------------------------

its the zeny that i want to remove since the script is not doing anything on the zeny 

--------------------------------------------------------------------------

Also,

Can you assist me on the below screenshot ? as the links for the items is stacking up.

I have diff settings for the below

20 Extend Chat Box
21 Extend Chat Room Box
22 Extend PM Box

image.png.732d63790c3bd638950dd90c0ee0fa05.png

For the resource file loading failed, when did the missing resource error come out?
As the item stacking problem, it's client issue so I can't do anything on it. But you may try using different client version like 20170614 since this version still work fine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

1 hour ago, yuchinin said:

For the resource file loading failed, when did the missing resource error come out?
As the item stacking problem, it's client issue so I can't do anything on it. But you may try using different client version like 20170614 since this version still work fine.

It is when i got the Item on the vending machine

i tried to search the file on ratemyserver.net and sprites is not available

image.png.335b12bbfcf35a5bce1d4c3d0ff41cf4.png

Even tried to check rdata.grf and data.grf i cannot file the sprites for it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

7 minutes ago, rmon said:

It is when i got the Item on the vending machine

i tried to search the file on ratemyserver.net and sprites is not available

image.png.335b12bbfcf35a5bce1d4c3d0ff41cf4.png

Even tried to check rdata.grf and data.grf i cannot file the sprites for it.

Coca Cola Zero? It must be inside data or rdata since it's official item.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

4 minutes ago, yuchinin said:

Coca Cola Zero? It must be inside data or rdata since it's official item.

I will still try to look for it :) 

 

Going back on Zeny Can you teach me how to remove it please ? :) 

image.png.93d27fdb0496f7a0cc5f3d3a95b7d402.png.0a612605614efce97a922a3941cccaaa.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

1 hour ago, rmon said:

I will still try to look for it :) 

 

Going back on Zeny Can you teach me how to remove it please ? :) 

image.png.93d27fdb0496f7a0cc5f3d3a95b7d402.png.0a612605614efce97a922a3941cccaaa.png

I still don't get what you mean how to remove it@@
Remove it hmm....did you mean ~ Bronze Coin [100z] > ~ Bronze Coin? Without showing the zeny?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

6 hours ago, yuchinin said:

I still don't get what you mean how to remove it@@
Remove it hmm....did you mean ~ Bronze Coin [100z] > ~ Bronze Coin? Without showing the zeny?

Yes @yuchinin:)

I want to remove ALL the showing Zeny display/function on vending and slot machine.

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  120
  • Reputation:   48
  • Joined:  07/23/13
  • Last Seen:  

9 hours ago, rmon said:

Yes @yuchinin:)

I want to remove ALL the showing Zeny display/function on vending and slot machine.

 

Change line 32 of vendingMachine.txt to 
 

Quote

 return CStr(getitemname(.@coin),.@tmp$);

 

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  111
  • Reputation:   2
  • Joined:  05/09/13
  • Last Seen:  

hello all

i just download this and tried it, but it gave me some errors.
i did my best but somewhere im failing.

I hope someone can help me out 

[Error]:  Loading NPC file: npc/afriel/black_market/vendingMachine.txt
script error on npc/afriel/black_market/vendingMachine.txt line 32
    parse_line: expected ';'
    27 : {
    28 :        .@coin = getarg(0);
    29 :        if(.@coin==673) .@tmp$ = "BROWN";
    30 :        else if(.@coin==677) .@tmp$ = "SILVER";
    31 :        else if(.@coin==674) .@tmp$ = "MITHRIL";
*   32 :        return CStr'('getitemname(.@coin)+" ["+CZeny(getiteminfo(.@coin,0))+"]",.@tmp$);
    33 : }
    34 :
    35 : Function       script  EjectCoin       {       // EjectCoin({<coin left>,<coin type>})
    36 :        .@coinleft = getarg(0,@coinamt);
    37 :        .@var$ = getarg(1,".coin");
[Error]:
script error on npc/afriel/black_market/vendingMachine.txt line 55
    parse_line: expected ';'
    50 :                                        soundeffect "slot_jackpot.wav",1;
    51 :                                }
    52 :                        }
    53 :                        .@coinleft = .@coinleft-(.@bal*.@price);
    54 :                        getitem .@coin,.@bal;
*   55 :                        mes .@bal+" x "+CCoin'('.@coin);
    56 :                }
    57 :        }
    58 :        @coinamt = 0;
    59 :        next;
    60 :        return;
[Error]:
script error on npc/afriel/black_market/vendingMachine.txt line 69
    parse_line: expected ';'
    64 :        .@var$ = getarg(0,".coin");
    65 :        .@size = getarraysize(getvariableofnpc(getd(.@var$),strnpcinfo(3)));
    66 :        mes "Usable Coin:";
    67 :        for(.@i=0;.@i<.@size;.@i++){
    68 :                // show usable coin
*   69 :                mes " ~ "+CCoin'('getvariableofnpc(getd(.@var$+"["+.@i+"]"),strnpcinfo(3)));
    70 :        }
    71 :        return;
    72 : }
    73 :
    74 : Function       script  HaveCoin        {
[Error]:
script error on npc/afriel/black_market/vendingMachine.txt line 82
    parse_subexpr: expected ':'
    77 :        .@max = getarg(2,0);
    78 :        .@str$ = getarg(3,"Insert");
    79 :        .@size = getarraysize(getvariableofnpc(getd(.@var$),strnpcinfo(3)));
    80 :        for(.@i=0;.@i<.@size;.@i++){
    81 :                .@coin = getvariableofnpc(getd(.@var$+"["+.@i+"]"),strnpcinfo(3));
*   82 :                set .@menustr$,.@menustr$ + (countitem(.@coin) && (.@max?(.@max-@coinamt)/getiteminfo(.@coin,0):1)?" >> "+.@str$+" "+CCoin'('.@coin)+" <<  ("+CStr(countitem(.@coin),"RED")+"):":":");
    83 :        }
    84 :        if(.@eject) set .@menustr$,.@menustr$+(@coinamt?CStr(" << Eject  Coin >>","RED")+":":":");
    85 :        return .@menustr$;
    86 : }
    87 :
[Error]:
script error on npc/afriel/black_market/vendingMachine.txt line 97
    parse_line: expect command, missing function name or calling undeclared function
    92 : unitwalk getcharid(3),.@x_n-2,.@y_n;
    93 : end;
    94 : OnTouch:
    95 : @coinamt = 0;
    96 : mes "Play Coin Roulette?";
*   97 : 'U'sableCoin();
    98 : next;
    99 : select("Play","No");
   100 : while( @menu == 1 ){
   101 : do{
   102 : mes "Bet: << "+CStr(CZeny(@coinamt),"RED")+" >>","Max Bet << "+CZeny(.max_bet)+" >>","=========================",
[Error]:
script error on npc/afriel/black_market/vendingMachine.txt line 244
    parse_line: expect command, missing function name or calling undeclared function
   239 : end;
   240 : OnTouch:
   241 : function PriceList;function CMenu;function choose;function RES_TYPE;
   242 : if(!getcharid(0)) end;
   243 : mes "A "+.npcname$;
*  244 : 'U'sableCoin();
   245 : next;
   246 : do{
   247 :        PriceList();
   248 :        next;
   249 :        select(CMenu());
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/afriel/black_market/slotmachine.txt', line '3'. Stopping...
 * w1=}
 * w2=
 * w3=
 * w4=

 

Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

this script don't work anymore!

...more (custom?) functions are missing and the code is obsolete! ?

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
Reply to this topic...

×   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...