Jump to content

ItsFree

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by ItsFree

  1. como tal una guia en español escrita y actualizada no hay, todas estan en ingles en todo caso, es solo seguir la logica de los videos y editar y probar, en lo que respecta a items como headgears y eso...

    para item deberas enfocarte en 3 cosas:

    1.- Client Side:

    en la carpeta de System dentro de tu cliente (donde esta el Grf, Emblem, System, ETC) el archivo llamado.... iteminfo.lua

    Ejemplo: 

    Este sirve para Asignar descripciones y "vincular" el item_db con el sprite, tambien es importante que pongas el numero de slots conforme a como lo pondras, ya que si pones 0 aqui y en el item_db pones 1, no se veran visualmente los slots asi los tenga.

    [60607] = {
    		unidentifiedDisplayName = "Red Angel Wings",
    		unidentifiedResourceName = "Red_Angel_Wings",
    		unidentifiedDescriptionName = { "" },
    		identifiedDisplayName = "Red Angel Wings",
    		identifiedResourceName = "Red_Angel_Wings",
    		identifiedDescriptionName = {
    			"^FF0000Costume Only^000000.",
    			"_______________________",
    			"^0000CCType:^000000 Headgear",
    			"^0000CCDefense:^000000 0",
    			"^0000CCPosition:^000000 Low",
    			"^0000CCWeight:^000000 10",
    			"^0000CCArmor Level:^000000 1",
    			"^0000CCRefineable:^000000 No",
    			"_______________________",
    			"^0000CCRequirement:^000000",
    			"All classes"
    		},
    		slotCount = 0,
    		ClassNum = 6607,
    		costume = true
    	}



    2.- Emulador Side:

    item_db.yml

    Ejemplo:

    En este sirve para asignar al objeto dentro del juego una ID, y sus posibles efectos (en el caso que no quieres que sea Costume borra 'Costume_' y te permitira alojarlo en Low Headgear, ya si desear Mid o Top, solo es seguir el patron)

      - Id: 60607
        AegisName: Red_Angel_Wings
        Name: Red Angel Wings
        Type: Armor
        Buy: 20
        Weight: 1
        Defense: 5
        Slots: 0
        Locations:
          Costume_Head_Low: true
        ArmorLevel: 1
        Refineable: false
        View: 6607
        Script: |
          bonus bAllStats,10;


    3.- Grf Side:

    Dentro del Grf ocuparas diversos archivos en diversas ubicaciones, empecemos con las que asignan ID en este caso los .lub

     

    \data\luafiles514\lua files\datainfo\accessoryid.lub

    	ACCESSORY_Red_Angel_Wings = 6607

     

    \data\luafiles514\lua files\datainfo\accname.lub

    	[ACCESSORY_IDs.ACCESSORY_Red_Angel_Wings] = "_Red_Angel_Wings"

    Seguido de...

    (Normalmente la parte de acomodar sprites es lo mas facil, solo es revisar que los nombres coincidan y cada sprite empiece como corres ponde, recuerda que son .ACT y .SPR por cada carpeta, para el de Drop, el de Male y el de Female)

    \data\sprite\¾ÆÀÌÅÛ

    \data\sprite\¾Ç¼¼»ç¸®\¿©

    \data\sprite\¾Ç¼¼»ç¸®\³²

     

    (Respecto a las ilustraciones similar a los sprites, solo asegurate respetar en el caso de item el 24x24 y en collection revisa las dimensiones de algun otro objeto)

    \data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection

    \data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item

    image.png.6fdc03444e16fc349db3c4f8460bbb6a.png

     

    Y con eso podras crear un objeto en tu server, para crear items ETC, Armas o Armaduras, en el caso de Armaduras y ETC/Consumible no ocupas un sprite de Female/Male, unicamente el de drop y como no ocupas Female/Male no ocupas ni el accessoryid.lub ni el accname.lub; 

     

    Trate de descomprimir algun grf asi sea viejo que tengas y solo es repetir y repetir hasta que eventualmente salga, nadamas procura siempre poner lo que son los nombres oficiales del sprite para evitar errores y ya con el iteminfo y el item_db.yml con esos 2 les asignas un nombre a tu eleccion, asi te evitas el andar editando sprite por sprite a tu antojo y evitas errores.

     

    Espero te pueda servir de algo y lamento si no me explique en algo apropiadamente xD

     

    Ojo.... mucho cuidado... recomiendo usar Notepad++, mas que nada porque algunos tienden a confundir los TABs por espacios, incluso yo por descuido propio aun asi cometo esos errores y con el Notepad++ es mas facil distinguir esos detalles, ya que asi tenga el mismo rango y uses espacio pero era TAB... desde ahi tu item_db crashea y te saldra ya todo con error, asi que mucho cuidado.

     

    PD: a mi tambien me ayudaron asi que.... dejo mi granito de arena ?
    PD2: Si cometi error en algun lado, sean libres de corregirme xP

    • Love 1
  2. Thanks!

    tried but got this:

    b132e9a86d7eecce7f99a5bf651fc331.png

    whole script:

    function	script	RefineScroll	{
    			set .@menu$,"";
    			for( set .@i,1; .@i = 8; set .@i,.@i+1 )
    			{
    				if( getequipisequiped(.@i) )
    					set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
    
    				set .@menu$, .@menu$ + ":";
    			}
    	set .@part,select(.@menu$);
    	
    	// =========================    
    	
    	if(!getequipisequiped(.@part)) {
    		getitem 60712,1;
    		dispbottom "You're not wearing anything there that refines!";
    		close;
    	}
    	//Check if the item is refinable...
    	if(!getequipisenableref(.@part)) {
    		getitem 60712,1;
    		dispbottom "There is no way that this item could be refined!";
    		close;
    	}
    	//Check refinement
        if ( getequiprefinerycnt(.@part) < 8 || getequiprefinerycnt(.@part) >= 10 ) {
            getitem 542,1;
            dispbottom "I can only refine +8 and +9 items!";
            close;
        }
    	
    		successrefitem .@part;
    		dispbottom "There you go, Refine Scroll works like a charm :D";
    		close;
    	}

     

     

  3. Hi, i'd like to ask how could i put the script and it do the next:

     

    .@r = getrefine(); if (.@r>=6) atcommand  

    i've this but after atcommand i tried with: atcommand "@refine 4,+1" but just dont works, what am i doing bad? thanks!

     

    what i want? a consume item that let me refine an item but it needs at least X refine level.

     

    Thanks!

  4. Hi, i read this guide:

    Info about im using:

    .exe: 2020-04-01

    trunk date: 2021-09-18

    Also i used this to test: 

    //===== rAthena Script =======================================
    //= Sample Random Option Script
    //===== Description: =========================================
    //= Enchant a weapon with a random element option 
    //= to a weapon with no random option.
    //===== Changelogs: ==========================================
    //= 1.0 First version. [Secretdataz]
    //============================================================
    
    prontera,162,195,4	script	Elemental Master	1_M_WIZARD,{
    	disable_items;
    	mes "[Elemental Master]";
    	mes "I could enchant your weapon with an element.";
    	mes "Are you interested?";
    	next;
    	if(select("Yes, I'm interested in that.") == 1){
    		.@id = getequipid(EQI_HAND_R);
    		for(.@i = 0; .@i < .sz; ++.@i){
    			if(.@id == .alloweditems[.@i])
    				.@allowed = 1;
    		}
    		mes "[Elemental Master]";
    		if(.@id == -1) {
    			mes "You are not holding anything in your hand.";
    			close;
    		} else if(!.@allowed){
    			mes "Your item can't be enchanted.";
    			close;
    		} else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){
    			mes "Your weapon has already been enchanted.";
    			close;
    		}
    		mes "Do you want to enchant your " + getitemname(.@id) + " with a random element?";
    		next;
    		if(select("Yes, proceed.") == 1){
    			mes "[Elemental Master]";
    			mes "*mumble mumble*";
    			progressbar "#00FF00",2;
    			next;
    			setrandomoption(EQI_HAND_R,0,RDMOPT_WEAPON_ATTR_NOTHING + rand(10),0,0);
    			mes "[Elemental Master]";
    			mes "Here's your weapon";
    			close;
    		}
    		close;
    	}
    	else{
    		close;
    	}
    	
    OnInit:
    	setarray .alloweditems[0],1201,1202; // Add more item ids here
    	.sz = getarraysize(.alloweditems);
    }

     

    the main problem are with these effects:

      - Id: 232
        Option: ADDEXPPERCENT_KILLRACE_NOTHING
        Script: |
          bonus2 bExpAddRace,RC_Formless,getrandomoptinfo(ROA_VALUE);
      - Id: 233
        Option: ADDEXPPERCENT_KILLRACE_UNDEAD
        Script: |
          bonus2 bExpAddRace,RC_Undead,getrandomoptinfo(ROA_VALUE);
      - Id: 234
        Option: ADDEXPPERCENT_KILLRACE_ANIMAL
        Script: |
          bonus2 bExpAddRace,RC_Brute,getrandomoptinfo(ROA_VALUE);
      - Id: 235
        Option: ADDEXPPERCENT_KILLRACE_PLANT
        Script: |
          bonus2 bExpAddRace,RC_Plant,getrandomoptinfo(ROA_VALUE);
      - Id: 236
        Option: ADDEXPPERCENT_KILLRACE_INSECT
        Script: |
          bonus2 bExpAddRace,RC_Insect,getrandomoptinfo(ROA_VALUE);
      - Id: 237
        Option: ADDEXPPERCENT_KILLRACE_FISHS
        Script: |
          bonus2 bExpAddRace,RC_Fish,getrandomoptinfo(ROA_VALUE);
      - Id: 238
        Option: ADDEXPPERCENT_KILLRACE_DEVIL
        Script: |
          bonus2 bExpAddRace,RC_Demon,getrandomoptinfo(ROA_VALUE);
      - Id: 239
        Option: ADDEXPPERCENT_KILLRACE_HUMAN
        Script: |
          bonus2 bExpAddRace,RC_DemiHuman,getrandomoptinfo(ROA_VALUE);
      - Id: 240
        Option: ADDEXPPERCENT_KILLRACE_ANGEL
        Script: |
          bonus2 bExpAddRace,RC_Angel,getrandomoptinfo(ROA_VALUE);
      - Id: 241
        Option: ADDEXPPERCENT_KILLRACE_DRAGON
        Script: |
          bonus2 bExpAddRace,RC_Dragon,getrandomoptinfo(ROA_VALUE);
      - Id: 242
        Option: ADDEXPPERCENT_KILLRACE_ALL
        Script: |
          bonus2 bExpAddRace,RC_All,getrandomoptinfo(ROA_VALUE);

     

    yeah im using .yml the situation is... for some reason the NPC apply the random option sadly for some reason i dont get the random option i get something like this:

    image.png.7a07ed1bf2866b9b7d0954ae2d322331.png

     

    the AddEXP just dont show and i dont get any error at console, also gonna shared my client files:

     

    addrandomoptionnametable.lub:

    c20863ad6bf558bbf23df2a4e0560e64.png

    enumvar.lub:

    10b8f9a74808cb95111923c9550c24bd.png

    csv2yaml.hpp

    7645fd870c0dbc198e1241b5c7954c7d.png

    what can i do?  Thanks ^^

  5. Hi, as the title say, im trying with a server with max lvl 500, but the Stat Points are nothing, i tried changing the "statpoint.txt" (im using renewall and i changed the "statpoint.txt" from "re" and "import" and still problem) looks like even if i change the statpoint.txt they dont change, i mean i added my own stat points level for level from 1 to 500... but nothing happen, i check on console and no error

    at this moment im using this... i tried with something easy like this to test but... didnt work i could use a "fix" changing the Stat Reset and adding more Stat Points, but that dont solve the problem the max Stat Points i got for lvl 500, is around 25k~26k what i want is around 75k~85k how coul i fix this ¿? Thx... if need more info please tell me ^^

    //statpoint per lvl
    30
    30
    30
    30
    30
    30
    30
    30
    30
    40
    40
    40
    40
    40
    40
    40
    40
    40
    50
    50
    50
    50
    50
    50
    50
    50
    50
    50
    60
    60
    60
    60
    60
    60
    60
    60
    60
    60
    70
    70
    70
    70
    70
    70
    70
    70
    70
    70
    80
    80
    80
    80
    80
    80
    80
    80
    80
    80
    90
    90
    90
    90
    90
    90
    90
    90
    90
    90
    100
    100
    100
    100
    100
    100
    100
    100
    100
    100
    110
    110
    110
    110
    110
    110
    110
    110
    110
    110
    120
    120
    120
    120
    120
    120
    120
    120
    120
    120
    130
    130
    130
    130
    130
    130
    130
    130
    130
    130
    140
    140
    140
    140
    140
    140
    140
    140
    140
    140
    150
    150
    150
    150
    150
    150
    150
    150
    150
    150
    160
    160
    160
    160
    160
    160
    160
    160
    160
    160
    170
    170
    170
    170
    170
    170
    170
    170
    170
    170
    180
    180
    180
    180
    180
    180
    180
    180
    180
    180
    190
    190
    190
    190
    190
    190
    190
    190
    190
    190
    200
    200
    200
    200
    200
    200
    200
    200
    200
    200
    210
    210
    210
    210
    210
    210
    210
    210
    210
    210
    220
    220
    220
    220
    220
    220
    220
    220
    220
    220
    230
    230
    230
    230
    230
    230
    230
    230
    230
    230
    240
    240
    240
    240
    240
    240
    240
    240
    240
    240
    250
    250
    250
    250
    250
    250
    250
    250
    250
    250
    260
    260
    260
    260
    260
    260
    260
    260
    260
    260
    270
    270
    270
    270
    270
    270
    270
    270
    270
    270
    280
    280
    280
    280
    280
    280
    280
    280
    280
    280
    290
    290
    290
    290
    290
    290
    290
    290
    290
    290
    300
    300
    300
    300
    300
    300
    300
    300
    300
    300
    310
    310
    310
    310
    310
    310
    310
    310
    310
    310
    320
    320
    320
    320
    320
    320
    320
    320
    320
    320
    330
    330
    330
    330
    330
    330
    330
    330
    330
    330
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531

    PD: Yeah i already set max stat to 500 even i compile and everything but still the problem.

  6. Hi, rAthena Community i've this script is working and everything... but is there a way to add more timers ¿? i mean... i've those 3 maps... but i want that "guild_vs3" as pvp for 4 days, then "guild_vs2" for 3 days and "guild_vs1" for 2 days... how can i do it ¿?

     

    //  ________________________________________________________
    // /                                                        \
    // |       _           _   _   _                            |
    // |      | |__  _ __ / \ | |_| |__   ___ _ __   __ _       |
    // |      | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |      |
    // |      | |_) | | / ___ \ |_| | | |  __/ | | | (_| |      |
    // |      |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|      |
    // |                                                        |
    // |                     brAthena Script                    |
    // |--------------------------------------------------------|
    // | Name of Script: Rotative PVP                           |
    // |--------------------------------------------------------|
    // | Created by: Neko                                       |
    // |--------------------------------------------------------|
    // | Version rA/brA: 1.0                                    |
    // |--------------------------------------------------------|
    // | Description: PVP NPC                                   |
    // | - An NPC that alternates the current PVP map from time |
    // | to time, the chosen map for rotation are configured by |
    // | the administrator in the script. The idea is to have   |
    // | multiple pvp rooms, without having to divide the players|
    // | of your server among them, this way pvps are more crowded|
    // | and funnier.                                           |
    // |--------------------------------------------------------|
    // | Changelog:               	                            |
    // | 1.0 Script Created [Neko]                              |
    // |--------------------------------------------------------|
    // | - Note:                                                |
    // | *There is a temporary global variable named $@lista$ in|
    // | this NPC, watch out for global variables with the same |
    // | name in other NPCs of yours.                           |
    // |--------------------------------------------------------|
    // | Any problem with this NPC please report directly to me.|
    // \________________________________________________________/
    
    -	script	PvpRotative	-1,{
    
    OnInit:
    // ======================================
    // Configurations ***********************
    // ======================================
    // Which map will be on the rotation?
       setarray .lista$[0],"guild_vs3","guild_vs2","guild_vs1";
    // From how much time to time will the maps change? (Standard value 30 minutes/18000000)
    // WARNING, DO NOT SET VALUES HERE SMALLER THAN 60000 (1 Minute).
       set .rotatetime, 864000000;
    // ======================================	
    
    	set $@lista$, ""+.lista$[0]+"";
    	set .count, getarraysize(.lista$);
    
    	for( set .@i,0; .@i < .count; set .@i, .@i+1 ){
    			sleep .rotatetime-60000;
    			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 30 seconds.",8;
    			sleep 30000;
    			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 20 seconds.",8;
    			sleep 20000;
    			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 10 seconds.",8;
    			sleep 10000;
    			if(.lista$[.@i] == .lista$[.count-1]){
    				mapwarp ""+.lista$[.@i]+"",""+.lista$[0]+"",0,0;
    				set $@lista$, ""+.lista$[0]+"";
    				set .@i,-1;
    			}
    			else{
    				mapwarp ""+.lista$[.@i]+"",""+.lista$[.@i+1]+"",0,0;
    				set $@lista$, ""+.lista$[.@i+1]+"";
    			}
    		}
    }
    
    prontera,153,179,4	script	PvP Keeper	459,{
    
    	mes "[PvP Keeper]";
    	mes "Ready for a bloody";
    	mes "and glorious battle today?";
    	if (select("Enter PVP. ["+getmapusers(""+$@lista$+"") +"]:I'm out of potions today.") == 1) {
    		warp ""+$@lista$+"",0,0;
    		end;
    	}
    	next;
    	mes "[PvP Keeper]";
    	mes "Haha!~";
    	mes "It's okay to be scared!!";
    	mes "HAHAHAHAHAHA!";
    	close;
    }

    Thx! ^^

  7. Hi rAthena Community, im requesting some help about "edit" the Euphy's Quest Shop...

    This one:
     

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6b
    //===== Compatible With: =====================================
    //= rAthena SVN r16862+
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //============================================================
    prontera,164,203,6	script	Quest Shop#1	998,{ callfunc "qshop"; }
    
    
    // Script Core
    //============================================================
    -	script	quest_shop	-1,{ 
    function Add; function Chk; function Slot; function A_An;
    OnInit:
    	freeloop(1);
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
    	set .Announce,1;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .ShowID,0;  	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    	set .MaxStack,100;	// Max number of quest items purchased at one time.
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //	setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
    	setarray .Points$[0],"#CASHPOINTS","Cash Points";
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //	setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
    	setarray .Shops$[1],"Headgears","Weapons","Other";
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //	Add(<shop ID>,<reward ID>,<reward amount>,
    //	    <Zeny cost>,<point cost>,
    //	    <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    
    	Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2);
    	Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600);
    	Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
    	Add(1,5045,1,0,0,2252,1,1054,450,943,1200);
    
    	Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
    	Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
    
    	Add(3,531,1,3,0,512,1,713,1);
    	Add(3,532,1,3,0,513,1,713,1);
    	Add(3,533,1,3,0,514,1,713,1);
    	Add(3,534,1,3,0,515,1,713,1);
    
    // -----------------------------------------------------------
    
    	freeloop(0);
    	set .menu$,"";
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
    		set .menu$, .menu$+.Shops$[.@i]+":";
    		npcshopdelitem "qshop"+.@i,909;
    	}
    	end;
    
    OnMenu:
    	set .@size, getarraysize(@i);
    	if (!.@size) set .@i, select(.menu$);
    	else if (.@size == 1) set .@i, @i[0];
    	else {
    		for(set .@j,0; .@j<.@size; set .@j,.@j+1)
    			set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
    		set .@i, @i[select(.@menu$)-1];
    	}
    	deletearray @i[0],getarraysize(@i);
    	if (.Shops$[.@i] == "") {
    		message strcharinfo(0),"An error has occurred.";
    		end;
    	}
    	dispbottom "Select one item at a time.";
    	callshop "qshop"+.@i,1;
    	npcshopattach "qshop"+.@i;
    	end;
    
    OnBuyItem:
    	// .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
    	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
    	copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0]));
    	set .@q[2],.@q[1]*.@q[3];
    	if (!.@q[2] || .@q[2] > 30000) {
    		message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+".";
    		end;
    	}
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	disable_items;
    	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
    	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
    	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    	next;
    	setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
    	if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192)))
    		set .@preview,1;
    	addtimer 1000, strnpcinfo(0)+"::OnEnd";
    	while(1) {
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
    		case 1:
    			if (@qe[0]) { 
    				mes "[Quest Shop]";
    				mes "You're missing one or more quest requirements.";
    				close;
    			}
    			if (!checkweight(.@q[0],.@q[2])) {
    				mes "[Quest Shop]";
    				mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    				close;
    			}
    			if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
    			if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
    			if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    				delitem .@q[.@i],.@q[.@i+1]*.@q[1];
    			getitem .@q[0],.@q[2];
    			if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0;
    			specialeffect2 EF_FLOWERLEAF;
    			close;
    		case 2:
    			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
    			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
    			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
    			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
    			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
    			break;
    		case 3:
    			close;
    		}
    	}
    
    OnEnd:
    	if (@qe[7]) {
    		changelook LOOK_HEAD_BOTTOM, @qe[3];
    		changelook LOOK_HEAD_TOP, @qe[4];
    		changelook LOOK_HEAD_MID, @qe[5];
    		changelook LOOK_ROBE, @qe[6];
    	}
    	deletearray @qe[0],8;
    	end;
    
    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }
    
    function Chk {
    	if (getarg(0) < getarg(1)) {
    		set @qe[0],1;
    		return "^FF0000";
    	} else
    		return "^00FF00";
    }
    
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot) {
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$;
    	}
    }
    
    function A_An {
    	setarray .@A$[0],"a","e","i","o","u";
    	set .@B$, "_"+getarg(0);
    	for(set .@i,0; .@i<5; set .@i,.@i+1)
    		if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
    	return "a "+getarg(0);
    }
    }
    
    function	script	qshop	{
    	deletearray @i[0],getarraysize(@i);
    	for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
    		set @i[.@i],getarg(.@i);
    	doevent "quest_shop::OnMenu";
    	end;
    }
    
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	qshop1	-1,909:-1
    -	shop	qshop2	-1,909:-1
    -	shop	qshop3	-1,909:-1
    -	shop	qshop4	-1,909:-1
    -	shop	qshop5	-1,909:-1


    what i want is add a "cool down/delay" of creation for each quest, what i mean ¿? for example... if i wanna create a Valkyrian Armor, i'll need some items... but after i deliver the items i've to wait 60~120 minutes i mean something like "come on 120 minutes" the npc will tell me or something like that... even can count the minutes if the character log out but once i accept to create 1 quest, i cant accept a new one only after i get the stuff im already waiting... i found a similar script well i guess... 

    This NPC is a warpear with delay i want something like that but i've wait the time to get the item

    im thinking on Euphy's Quest Shop because usually is the one the people use as base, if have a better NPC to do this i'll accept c:

    the basic idea is that, complete the quest but have to wait 120 minutes to claim the quest, if i click the npc it will tell me something like "is not ready yet" and only can do other quest after complete the last (wait those 120 minutes and get the quest)

    if need more information pls tell me to try to explain better.... i gonna try find more examples like these

    PD: i saw this once on a server some years ago so i guess is still possible ><

     

  8. as i understand for this request is like a "simon's said game" i usually see these event do it manually by a gm "the gm ask for X item and the player have to bring it" i guess what he want is that event on an npc... well is how i understand his request :D

  9. not really about how to know what should i put to "configure" the percent of each one yeah if i copy&paste im sure will work but dont understand how edit it xD

    the npc would be something like this i guess

     

    prontera,145,171,5	script	GamblerNPC::spiritD	112,{
    
    	if(#CASHPOINTS == 0){
    		mes "You don't have enough points";
    		close;
    	}
    	if(#CASHPOINTS > 0){
    		mes "You have "+#CASHPOINTS+" cash points.";
    		mes "One roll costs 1 cash point.";
    		mes "Would you like to roll?";
    		switch(select("No thanks:Yes please")){
    		case 1:
    			close;
    		case 2:
    			#CASHPOINTS--;		//subtract CASHPOINTS by 1
    			.@winNum = rand(99);  //100
    			if (.@winNum >= 0 && .@winNum <= 4) { getitem <PRIZE_ID>,1; } //5% chance
    			if (.@winNum >= 5 && .@winNum <= 9) { getitem <PRIZE_ID>,1; } //5% chance
    			if (.@winNum >= 10 && .@winNum <= 19) { getitem <PRIZE_ID>,1; } //10% chance
    			if (.@winNum >= 20 && .@winNum <= 29) { getitem <PRIZE_ID>,1; } //10% chance
    			if (.@winNum >= 30 && .@winNum <= 49) { getitem <PRIZE_ID>,1; } //20% chance
    			if (.@winNum >= 50 && .@winNum <= 99) { getitem <PRIZE_ID>,1; } //50% chance
    			else { debugmes "[GamblerNPC] "+strcharinfo(0)+" is a hacker!!"; }
    			mes "Congrats!";
    			close;
    		}
    	}
    }


     

  10. nice working now just 2 things:

    1.- to add more is just add more...
     

    			if(.@winNum == 5){ getitem <PRIZE_ID>,1; }
    			if(.@winNum == 6){ getitem <PRIZE_ID>,1; }
    			if(.@winNum == 7){ getitem <PRIZE_ID>,1; }
    			if(.@winNum == 8){ getitem <PRIZE_ID>,1; }

    just that or have to edit something else ¿?

    2.- is there a way to add a "percent" about each item ¿? i mean to controll it and set all different % percent just like a custom box...

    Thx! <3
     

  11. Hi, rAthena Comunity yeah i know that this request can be maybe solve making a custom box (yep i know how do it) but the problem is that the custom box dont set the ammount :/ what i want is like a "gambler" or something like that i try to find some of them yeah i found some but got some errores or didnt work like i want... anyyway this is what i want:

    The player change 1 point to a "try" the try can give you x1 red pot, x2 red pot, x10 red pot, x5 blue pot, x3 green pots.... etc in short words...

    x1 point ==> X Item with Y Ammount.

    Thx! if need more information tell me, also gonna edit trying to add examples what i wanted to help to have an idea~
     


    is like this but maybe on "reverse" x1 point for a random item with X amount.

  12. you need wait at least 24 hours for a bump and add more information that just "bump" maybe someone read it but didnt understand try explain it better editing post ^^ also... wait some time 3 or 4 hrs usually is not enough to make the script more if is an "event" ^^

    PD: i also bumped once like you and i got warning for that reason saying you this... gl with the script ^^

    Also you can try edit the topic to be more specific for example when i request something i put something like "R> a NPC that exchange X item for Y item with Z Ammount" then the scripters can get an easy idea about what and inside this you explain everything also try add a example like "similar" thant you want... well that could help you to get a faster answer c:

    • Upvote 1
×
×
  • Create New...