Jump to content
  • 0

hi im using this lotti girl script how can i make this only announce to map


lelouchxv

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   8
  • Joined:  09/16/18
  • Last Seen:  

How can i make this lotti girl script only announce to map and only announce low chance items 10% chance blow

 

prt_gld,168,91,4    script    Lotti Girl    4_F_KAFRA7,{
function LinkItem_;
     if(Weight >= MaxWeight/2) goto Low;
    .@name$ = strcharinfo(0);
    .@rand = rand(.chances);
    .@i = 0;
    
    if( countitem(.itm_p) < .itm_a ){
        mes .n$;
        mes "You don't have any";
        mes .itm_a+" x "+.itm_n$;
        mes "in your inventory.";
        mes " ";
        mes "Please come back to me if you have it already.";
        close;
    }
    mes .n$;
    mes rand(2) ? ""+callfunc("F_Hi")+" ^0000FFI'm Lotti Girl^000000, of Prontera ." 
    : ""+callfunc("F_Hi")+" ^0000FFI'm Lotti Girl^000000, of Prontera ."; 
    mes "Required Item: "+.itm_a+" x "+(.itm_n$)+"";
    mes " ";
    mes "Would you risk to play this game?";
    next;
    if( select("- Play Game","- Cancel") == 2 ) {
        mes .n$;
        mes "Alright! "+ strcharinfo(0) +" come back anytime you want.";
        close;
    }
    while (( .@rand -= .item_Rate[.@i] ) >= 0 ) .@i++;
    progressbar "0x11CC99",.loading; specialeffect2 EF_REMOVETRAP;
    getitem .item_ID[.@i], 1;
    delitem .itm_p, 1;
    announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",0; 
    mes .n$;
    mes "You have obtained 1 x ^FF3000"+ getitemname(.item_ID[.@i]) +"^000000 with "+ .item_Rate[.@i] +"%.";
    close;
    
function    LinkItem_    {
    .@id = getarg(0);
    .@showslot = getarg(1,0);
    .@slot = getitemslots(.@id);
    return "<ITEM>"+(.@slot&&.@showslot?getitemname(.@id)+" ["+.@slot+"]":getitemname(.@id))+"<INFO>"+.@id+"</INFO></ITEM>";
}    


    Low:
    mes "You are Overweight!";
    close;

OnInit:
    .n$ = "[ Lotti Girl ]";
    .loading = 0;                                                 // 0 = No Delay
    .itm_p = 30040;                                                // Required Item
    .itm_a = 1;                                                    // Required Amount
    .itm_n$ = LinkItem_(.itm_p);
    setarray .item_ID, 607,502,503,504,505,506,507,508,509;        // Item ID List
    setarray .item_Rate, 100,10,10,10,3,10,10,10,10;            // Item ID Chances
    .@i = 0;
    while ( .item_ID[.@i] ) {
        .chances += .item_Rate[.@i];
        .@i++;
    }
    end;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

to just announce on map, change

announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",0; 

to

announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",bc_map; 

then if you want it to only announce by specific chances do something like,

if(.item_Rate[.@i] == <chance you want>){
	announce part of the script
}

 

Edited by Virtue
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   8
  • Joined:  09/16/18
  • Last Seen:  

59 minutes ago, Virtue said:
if(.item_Rate[.@i] == <chance you want>){
	announce part of the script
}

Where i can put this inside the script? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

if(.item_Rate[.@i] == <chance you want>){
	announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",bc_map; 
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   8
  • Joined:  09/16/18
  • Last Seen:  

31 minutes ago, Virtue said:
if(.item_Rate[.@i] == <chance you want>){
	announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",bc_map; 
}

 

i'll try this right now i'll update if it works thanks!

EDIT: it works thankyou @Virtue

Edited by lelouchxv
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
Answer this question...

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