Jump to content
  • 0

Triple or Nothing (Super Hot Request - Oppa Gangnam Style!)


Question

Posted

Thanks Master scripters for granting 100% of my requests!!!!

now i would like to request this:

1/3 chance to multiply a selected item from their inventory to 3.

________________________________________________

Details:

1. the player should know the ID for the item that he/she wants to bet that is located in their inventory, therefore, auto @itemlist when clicking the npc.

2. They will input the ID... (the bet)..and its triple or nothing time!!!

3. Advance merry xmas to all of you master scripters!!! thanks and goodluck!

6 answers to this question

Recommended Posts

Posted (edited)

prontera,156,180,5    script    Name2    100,{
   getinventorylist;
   while ( .@i < @inventorylist_count ) {
       .@menu$ = .@menu$ + @itemname2_info$ + callfunc("getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i]) +"; "+ @inventorylist_amount[.@i] +" ea.:";
       .@i++;
   }
   .@menu = select(.@menu$) -1;
   if ( !checkweight( @inventorylist_id[.@menu], @inventorylist_amount[.@menu] *2 ) )
       dispbottom "Overweight !";
   else if ( !rand(3) )
       getitem2 @inventorylist_id[.@menu], @inventorylist_amount[.@menu] *2, @inventorylist_identify[.@menu], @inventorylist_refine[.@menu], @inventorylist_attribute[.@menu], @inventorylist_card1[.@menu], @inventorylist_card2[.@menu], @inventorylist_card3[.@menu], @inventorylist_card4[.@menu];
   close;
}

and my getitemname2 function

very simple script actually ... dunno why nobody can make ... /hmm

1. you didn't say delitem ... so I just triple them out without delete them

2. I not sure you want to "triple" them or "set them to 3" ... I do triple though

EDIT:

always forgotten checkweight script command ...

Edited by AnnieRuru
Posted

I believe it was itended to work this way.... Bet item (delitem) If success (give 3), if fail (end). So in other words, yes, set to 3.

Also, i would have made it, but I really don't remember seeing this topic O.o

Posted
prontera,156,180,5	script	Name2	100,{
   getinventorylist;
   while ( .@i < @inventorylist_count ) {
       .@menu$ = .@menu$ + @itemname2_info$ + callfunc("getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i]) +"; "+ @inventorylist_amount[.@i] +" ea.:";
       .@i++;
   }
   .@menu = select(.@menu$) -1;
   if ( !checkweight( @inventorylist_id[.@menu], @inventorylist_amount[.@menu] *2 ) )
       dispbottom "Overweight !";
   else if ( !rand(3) )
       getitem2 @inventorylist_id[.@menu], @inventorylist_amount[.@menu] *2, @inventorylist_identify[.@menu], @inventorylist_refine[.@menu], @inventorylist_attribute[.@menu], @inventorylist_card1[.@menu], @inventorylist_card2[.@menu], @inventorylist_card3[.@menu], @inventorylist_card4[.@menu];
else
	delitem2 @inventorylist_id[.@menu], @inventorylist_amount[.@menu], @inventorylist_identify[.@menu], @inventorylist_refine[.@menu], @inventorylist_attribute[.@menu], @inventorylist_card1[.@menu], @inventorylist_card2[.@menu], @inventorylist_card3[.@menu], @inventorylist_card4[.@menu];
   close;
}

just add in delitem2 at the end, not that hard though

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...