Jump to content

BRDominik

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by BRDominik

  1. Hello,

    I'm trying to make a chat appear in two players at the same time, but I can't imagine a way to make it(Calling unattached func and attaching later seems to not work).

     

    Any suggestions so I can do that?

     

    I tried this: if(attachrid($@Player1) && attachrid($@Player2)) { callfunc "Something"; } But that doesn't work since it attach only to the last attach.

  2. hmm ? i dont see any function X ? and ur script alot of things are missing...

    • shop are not called..
    •  
    • no items to be purchase...
    •  
    • details like how you going to work on this..
    •  

    your script are basically just copied from

    trunk/npc/custom/quests/quest_shop.txt

    Im trying to make that on my own, the only part that I 'copied' was the getd area.

     

    And I posted the wrong script(Yay...).

     

     
    prontera,142,170,5    script    Quests    965,{
    function Add;
    callshop "qshop",1;
    npcshopattach "qshop";
    end;
     
    OnInit:
        // Não mexa em nada acima disso
        // Add(Reward ID,Reward Amount,Required ID,Required Amount,{,...});
        Add(535,1,536,1);
        npcshopdelitem "qshop",537;
        end;
     
    OnBuyItem:
        if(getarraysize(@bought_nameid) > 1) {
            mes "Por favor escolha só um item.";
            close;
        }
        mes strnpcinfo(1);
        mes "Quest: "+getd(".q_"+@bought_nameid+"[1]")+"x "+getitemname(getd(".q_"+@bought_nameid+"[0]"));
        mes "Requerimentos:";
        for(set .@i,2; .@i < getarraysize(getd(".q_"+@bought_nameid+"")); set .@i,.@i + 2) {
            mes ""+getd(".q_"+@bought_nameid+"["+(.@i+2)+"]")+"x "+getitemname(getd(".q_"+@bought_nameid+"["+(.@i+1)+"]"))+"";
            if(.@i%8 == 0) next;
        }
        close;
     
    function    Add    {
        if(getargcount()%2) { message "Zawe","Something went wrong. Theres is something wrong with the Code."; return; }
        for(set .@i,0; .@i < getargcount(); set .@i,.@i + 1) {
            if(.@i%2 == 0) {
                if(getitemname(getarg(.@i)) == "null") { message "Zawe","Something went wrong. One of the Items ID do not exist."; return; }
            }
        }
        for(set .@i,0; .@i < getargcount(); set .@i,.@i + 1) {
            setarray .@j[.@i],getarg(.@i);
            message "Zawe",getarg(.@i);
        }
        copyarray getd(".q_"+getarg(0)+"[0]"),.@j[0],getarraysize(.@j);
        npcshopadditem "qshop",getarg(0),1;
        return;
    }
    }
     
    -    shop    qshop    -1,537:-1
    
  3. i believe this..

    getd(".q_"+@bought_nameid+"["+.@i+"+2]")
    getd(".q_"+@bought_nameid+"["+.@i+"+1]")
    

     

    should be

    getd(".q_"+@bought_nameid+"["+( .@i + 1 )+"]")
    getd(".q_"+@bought_nameid+"["+( .@i + 2 )+"]")
    

    Yeah, I just realized that. =/ Im going to try and see if that works. Thx

     

    @edit The problem persist. Oh I forgot to say whats the real problem.  /whisp

     

    So the problem is that it dosen't get the values of [3] and [4], only from [0]. Instead of beeing 1x Ice Cream(536) it's 535x Pumpkins

  4. Hello, I'm trying to make a dynamic quest shop(Don't want to take a already made script), but I'm having a little trouble by making the getd get the right value.

     

     

    function x {
        [...]
        setarray .@j[0],535,1,536,1;
        copyarray getd(".q_"+getarg(0)+"[0]"),.@j[0],getarraysize(.@j); // beeing getarg(0) = 535
        [...]
    }
     
    OnBuyItem:
        [...]
        for(set .@i,2; .@i < getarraysize(getd(".q_"+@bought_nameid+"")); set .@i,.@i + 2) {
            mes ""+getd(".q_"+@bought_nameid+"["+.@i+"+2]")+"x "+getitemname(getd(".q_"+@bought_nameid+"["+.@i+"+1]")); // Beeing @bought_nameid = 535
        }
        [...]

     

    So the problem is that it dosen't get the values of [3] and [4], only from [0]. Instead of beeing 1x Ice Cream(536) it's 535x Pumpkins.(OnBuyItem).

     

    Any help is welcome.

  5. Hello, I'm trying to make an Npc, that duplicate itself everytime something happen. But I can't seem to find on the script_commands.txt a command to make that possible.

    From what I know there is no way to make a dupe with the normal way in the middle of the script or in a func, also I don't want to duplicate it and then move it/enable it. Since I did not managed to get a way to do that, I ask you guys if someone know a way to do that.

  6. Hello, I would like to know if theres a modification to use bindatcmd with an extra argument that could chose if I want to use @ or !. If theres already a topic that answere this question, I apologise, but I could not find it with the search.

×
×
  • Create New...