Jump to content

Luciar

Members
  • Posts

    177
  • Joined

  • Last visited

  • Days Won

    2

Community Answers

  1. Luciar's post in How to [delitem] a set number of items multiple times? was marked as the answer   
    [email protected] = countitem(994); // total number of Item ID 994 [email protected] = [email protected] / 100; //Floored division of total by 100 (e.g. 256 / 100 = 2)
    [email protected] = [email protected] % 100; //Remainder (e.g. 256 / 100 has remainder of 56)
    delitem 944,([email protected] - [email protected]); //Remove all but the remainder
    getitem 990,[email protected]; //Get total number of item id 990 = to floored division of total 994 (e.g. 256 --> 2)

    something like that
  2. Luciar's post in TOF Event was marked as the answer   
    I wrote this very quickly, forgive any errors. It's pretty straight forward, see what you can do with it

    quiz_02,347,387,4 script Trivia Control 123,{ [email protected]$ = "[^0000FFTrivial Controller^000000]"; mes [email protected]$; mes "Hello " + strcharinfo(0); if(getgmlevel() < .minGM) close; switch(.active) { case 1: mes "Players are still entering. Please wait."; close; case 2: switch(select("Ask Question:End Event")) { case 1: mes "Please input your question."; input [email protected]$; mes "Is it true or false?"; [email protected] = select("True:False"); next; mes [email protected]$; mes "Please verify your question:"; mes [email protected]$; mes ([email protected] == 1 ? "True" : "False"); select("Proceed"); close2; announce "Question time!",bc_map; sleep2 2000; announce "True or False?",bc_map; announce [email protected]$,bc_map; donpcevent "TrueWarp::OnActive"; donpcevent "FalseWarp::OnActive"; sleep2 25000; announce "5 seconds!",bc_map; sleep2 5000; donpcevent "TrueWarp::OnClose"; donpcevent "FalseWarp::OnClose"; announce "The answer is...",bc_map; sleep2 5000; announce ([email protected] == 1 ? "TRUE!!" : "FALSE!!"),bc_map; callsub OnReveal,[email protected]; end; case 2: mes "Event Ended."; announce "[Trivia Event] : The event has been ended by a GM",bc_all; .active = 0; close; } break; default: select("Activate Event"); .active = 1; announce "[Trivia Event] : The event has been activated. Come to Prontera and warp to the event to participate!",bc_all; donpcevent "Trivia Warp::OnActivate"; mes "Come talk to me when you're ready to proceed!"; close2; sleep2 30000; announce "[Trivia Event] : You have 30 more seconds to join the event. Come to Prontera to participate!",bc_all; sleep2 30000; announce "[Trivia Event] : The event has started and the warp has been closed.",bc_all; .active = 2; announce "[Trivia Event] : Welcome to the trivia event!",bc_map; sleep2 3000; announce "[Trivia Event] : You will have 30 seconds to select True or False after the question is displayed.",bc_map; sleep2 3000; announce "[Trivia Event] : Simply warp to the corresponding answer. O = TRUE X = FALSE",bc_map; end; } OnInit: .minGM = 1; .active = 0; end; OnReveal: if(getarg(0) == 1) { areawarp "quiz_02",324,334,347,357,"quiz_02",350,371; areawarp "quiz_02",352,334,352,357,"prontera",156,191; } else { areawarp "quiz_02",352,334,352,357,"quiz_02",350,371; areawarp "quiz_02",324,334,347,357,"prontera",156,191; } return; } quiz_02,337,365,0 script TrueWarp 45,2,2,{ warp "quiz_02",335,345; end; OnActive: enablenpc strnpcinfo(0); waitingroom "TRUE",0; end; OnClose: OnInit: disablenpc strnpcinfo(0); end; } quiz_02,362,365,0 script FalseWarp 45,2,2,{ warp "quiz_02",364,346; end; OnActive: enablenpc strnpcinfo(0); waitingroom "FALSE",0; end; OnClose: OnInit: disablenpc strnpcinfo(0); end; } prontera,150,191,0 script Trivia Warp 45,2,2,{ if(getvariableofnpc(.active,"Trivia Control")) warp "quiz_02",350,371; end; OnActivate: enablenpc strnpcinfo(0); waitingroom "Trivia Event",0; initnpctimer; end; OnTimer60000: stopnpctimer; OnInit: disablenpc strnpcinfo(0); end; }
  3. Luciar's post in Gold Room Pass! was marked as the answer   
    Change:
    if (countitem(969) <250) && (countitem(4001) <20) && (Zeny < [email protected]) goto L_Missing; To:
    if(countitem(969) < 250 || countitem(4001) < 20 || Zeny < [email protected]) goto L_Missing; This will change the logic from AND (meaning all statements are true) to OR (at least one of the statements is true).
     
    Check out your checkweight options here.
  4. Luciar's post in 3rd class quest item was marked as the answer   
    General Forum Etiquette
    Please don't edit your first post to remove your question when your problem has been solved. Please read the forum rules: here
  5. Luciar's post in Ok... i surrender, hell-pe me with those scripts! was marked as the answer   
    setd "[email protected]$", select("Fighting Enchant:Magic Enchant:Archer Enchant:Critical/Fatal Enchant:Max HP Enchant:Max SP Enchant:ASPD Enchant:STR Enchant:AGI Enchant:DEX Enchant:VIT Enchant:INT Enchant:LUK Enchant"); This sets a variable (name determined by the value of [email protected]$) equal to the selection of the menu presented by the select script command.
    For example, if [email protected]$ = "[email protected]" and the user selects "Fighting Enchant" from the menu then [email protected] = 1
    [email protected] = callfunc( (.chancetype?"EnchantStat_1":"EnchantStat_0"), [email protected]$) ; This sets the variable [email protected] to the value that is returned by the function EnchantStat_1( ) or Enchant_Stat_0( )  (function determined by the variable .chancetype) with an argument passed that was defined by the above setd line.
  6. Luciar's post in Can FluxCP database work with item.txt? was marked as the answer   
    Short answer: No
     
    Longer Answer: Not possible without re-writing how FluxCP gets its item db information. And if you did it would make your FluxCP far less efficient. Searching through a large text file such as item DB is terrible. This is exactly why things like SQL databases exist. Stick with the item DB on SQL
  7. Luciar's post in PK Area, script not functioning as it should was marked as the answer   
    Change your event label to something other than the NPC's name
  8. Luciar's post in Event Label Error was marked as the answer   
    Figured out the issue. Thanks for your help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.