Jump to content

buraquera

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by buraquera

  1. Thanks for update, It diff and compile perfectly But when i first try play "double inferno" this error showsup
  2. Thank u i appreciate very much Im getting this error when compiling the last version
  3. I recommend u check doc/script_commands.txt and read it full Anyway, u wont need to query. See: Some variables are special, that is, they are already defined for you by the scripting engine. You can see the full list in 'src/map/script_constants.hpp', which is a file you should read, since it also allows you to replace lots of numbered arguments for many commands with easier to read text. The special variables most commonly used are all permanent character-based variables: Zeny - Amount of Zeny. Hp - Current amount of hit points. MaxHp - Maximum amount of hit points. Sp - Current spell points. MaxSp - Maximum amount of spell points. StatusPoint - Amount of status points remaining. SkillPoint - Amount of skill points remaining. BaseLevel - Character's base level. JobLevel - Character's job level. BaseExp - Amount of base experience points. JobExp - Amount of job experience points. NextBaseExp - Amount of base experience points needed to reach the next level. NextJobExp - Amount of job experience points needed to reach the next level. Weight - Amount of weight the character currently carries. MaxWeight - Maximum weight the character can carry. Sex - 0 if female, 1 if male. Class - Character's job. Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. If the character has not reached a 1-1 class, it will return Job_Novice. BaseJob - The character's 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Baby Acolyte, and High Acolyte. Karma - The character's karma. Karma system is not fully functional, but this doesn't mean this doesn't work at all. Not tested. Manner - The character's manner rating. Becomes negative if the player utters words forbidden through the use of 'manner.txt' client-side file.
  4. There same ways of doing this. try this - script asdahjhla -1,{ OnPCKillEvent: if (countinarray(.map$,strcharinfo(3)) && $pkscore[getcharid(0)] < 21 && rand(100) <= .chance && killedrid != getcharid(3)){ getitem 7960, 1; $pkscore[getcharid(0)]++; } end; OnInit: .chance = 100; // chance to get something setarray .map$, "pvp_y_1-2"; // map list end; OnHour00: deletearray($pkscore); end; }
  5. Not sure if you can check if player has finish shopping via script. If no, and also if in your game the cashpoints are non-transferable u can try having a new acc variable as #CASHPOINTS_CALC So whenever u give a player cashpoints u add on both variables. Later u can have a script wich compares both variables and return the result. Could be called on a npc "Cash Expent Reward" or on an event as "OnPcLoginEvent" etc...
  6. Add this on line ~40, before // Randomize each Option Slot: if (!countitem(6608)){ mes "Você não possui nenhuum " + getitemname(6608) + "."; close; } delitem(6608,1);
  7. Specify what you want to limit ...?It may be a delay, or if the dead player is the same as last time ......
  8. I dont think it would be easy and efficient via script. There is no command wich checks if player has been hit.
  9. Try this ////////////////////////////////////////////////////////////////////////////////// // by AnnieRuru authored and MishimaHaruna // *** Function "F_ShuffleNumbers": // Generate a set of numbers in random order that the numbers are not repeated // --- callfunc "F_ShuffleNumbers",<start num>,<last num>,<output array>{,<count>}; // Examples: // callfunc("F_ShuffleNumbers", 0, 5, [email protected]) // possible output 4,1,3,2,0,5 // callfunc("F_ShuffleNumbers", -5, 1, [email protected]) // possible output -3,-5,-4,-2,-1,1,0 // callfunc("F_ShuffleNumbers", 0, 100, [email protected], 5) // possible output 9,55,27,84,33 // Reminder: Use *freeloop command when appropriate ! ////////////////////////////////////////////////////////////////////////////////// function script F_ShuffleNumbers { deletearray getarg(2); [email protected] = getarg(0); [email protected] = getarg(1) +1 - [email protected]; [email protected] = getarg(3, [email protected]); if ([email protected] <= 0 || [email protected] <= 0) return 0; if ([email protected] > [email protected]) [email protected] = [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]) [email protected][[email protected]] = [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { [email protected] = rand([email protected]); set getelementofarray( getarg(2), [email protected] ), [email protected][[email protected]] + [email protected]; [email protected][[email protected]] = [email protected][[email protected]]; } return [email protected]; } https://annieruru.blogspot.com/2019/01/shuffle-algorithm.html
  10. This script is not complete... Post it full.... Anyway, for what i can see it is already set this way u want if ( distance([email protected], [email protected], @x, @y) > 15 || @map$ != [email protected]$ ) { I dunno where theses scope varibles came from but assuming its getmapxy from mvp killer, it means the party member shouuld be on 14 cells distance and also in the same map (obviously)
  11. this? function script MvPResetRank { for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { setd "$topmvp" [email protected],0; setd "$topmvp" [email protected] +"$", ""; } return; } Note this will reset the rank but not the global player variable. U should clean it by an player attached script `MvP = 0` or via sql (wich i recommend having a custom table for that)
  12. You npc wont run because uyou have problem in your prontera cordinates, also has an extra coma after npc position anyway, try this prontera,155,175,5 script VIP Box Agent 828,{ // Show 1st message mes .npc$,"I Can Change VIP Boxes to Zeny."; for ([email protected] = 0 ; [email protected] < getarraysize(.vipbox); [email protected]++) mes "1 x " + .vipbox_name$[[email protected]] + " = ^640000" + .reward[[email protected]] + "^000000."; // Choose option mes "So what do you want?"; [email protected] = select(implode(.vipbox_name$,":")) -1; // Confirm clear; mes .npc$,"Are you sure you want to exchange your " + .vipbox_name$[[email protected]] + " to Zeny?"; if (select("Nevermind...:Yes..!") < 2) close; // Choose amount clear; mes .npc$,"How many Credits do you want to exchange?"; input [email protected]; clear; // Check ammount if ([email protected] < 1){ mes .npc$,"Wrong number..."; close; } // Check inventory if(countitem(.vipbox_id[[email protected]]) < [email protected]){ mes .npc$,"You dont have it..."; close; } // Conclude mes .npc$,"Thanks. . See you again. . . !"; delitem .vipbox_id[[email protected]],[email protected]; Zeny += .reward[[email protected]]*[email protected]; close; // When npc is loaded OnInit: // Set npc variables .npc$ = "[^000088 Mr. Credit ^000000]"; setarray .vipbox_id,12985,12986,12984; setarray .reward,500000,1000000,2000000; // Get item names for ([email protected] = 0 ; [email protected] < getarraysize(.vipbox_id); [email protected]++) .vipbox_name$[[email protected]] = getitemname(.vipbox_id[[email protected]]); }
  13. ive tested your script now Your problem is an unnecessary "space" here: - script vend_slot -1, { should be - script vend_slot -1,{
  14. You are missing some left and right curly on these for above OnInit OnInit: sleep 1000; // Map for vending .map$ = strnpcinfo(4); setcell .map$, 0, 0, 300, 300, cell_novending, 1; // x and y horizone .. setarray .x_line, 52, 49, 46, 43, 40; setarray .y_line, 68, 71, 74, 77, 65, 62; set .x_line_size, getarraysize(.x_line); set .y_line_size, getarraysize(.y_line); set .count, 1; for (set [email protected], 0; [email protected] < .x_line_size; set [email protected], [email protected] + 1) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< for (set [email protected], 0; [email protected] < .y_line_size; set [email protected], [email protected] + 1) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< if (checkcell(.map$, .x_line[[email protected]], .y_line[[email protected]], cell_chkpass)) { movenpc "#vend_slot"+.count, .x_line[[email protected]], .y_line[[email protected]]; setcell .map$, .x_line[[email protected]], .y_line[[email protected]], .x_line[[email protected]], .y_line[[email protected]], cell_novending, 0; set .count, .count + 1; } npctalk "Vending Spot : "+.count; donpcevent "::OnSetup"; end; }
  15. You file is unvailable... but if i understood what you want is something like prontera,150,150,4 script QuestTest 80,{ setarray [email protected],90000,90001,90002,90003; // here example of 4 different quests [email protected]_quests = getarraysize([email protected]); [email protected]_num = rand(1,[email protected]_quests); setquest [email protected][[email protected]_num-1]; end; }
  16. Get the renewall script on db/re/item_db Open the db/pre/item_db then overide it using the script you got
  17. Ive not tested but it may work (should be on item script) if (isequippedcnt(4600,46001,46002,46003.........))
  18. Unfortunately, you cant control the progressbar this way... U better use sleep or freeze status. something like: prontera,74,62,0 script Red Crystal 1915,{ if (.char == getcharid(3)) end; if (.char) sc_end SC_SLEEP,.char; .char = getcharid(3); getitem 6480,10; dispbottom "[Red Crystal] Capturing..."; mapannounce strcharinfo(3),strcharinfo(0)+" has get the Price!",bc_map,"0xff77ff"; sc_start SC_SLEEP,.fcast,10; sleep2 .fcast; if (.char == getcharid(3)){ .char = 0; sc_end SC_SLEEP,.char; } end; OnInit: set .fcast,15*1000; }
  19. Via scripts you can do makepet <pet id>; while(!getpetinfo(PETINFO_ID) bpet; But this will acctually give the char an egg and then open the hatch egg windows. If the player cancels the hatch, i will open again until player has selected to hatch it. I think its the best you u can do via script...
  20. alberta,220,42,3 script CardTrader 60,{ getinventorylist; for([email protected] = 0 ; [email protected] < getarraysize(.cards); [email protected]++){ for([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++){ if (.cards[[email protected]] == @inventorylist_id[[email protected]]){ [email protected]++; break; } } if ([email protected] <= [email protected]){ mes "[Card Trader]","Sorry you don't have all cards..."; close; } } mes "[Card Trader]","Congratz you have all cards."; for ([email protected] = 0 ; [email protected] < getarraysize(.prize); [email protected] += 2) getitem .prize[[email protected]],.prize[[email protected]+1]; for([email protected] = 0 ; [email protected] < getarraysize(.cards); [email protected]++) delitem .cards[[email protected]],1; close; OnInit: setarray .cards,4001,4002,4003,4004; // Card ID list setarray .prize,909,3,901,5; // <ITEM ID><AMOUNT>{<ITEM ID><AMOUNT>....} }
  21. You have to set your item id and amount here setarray [email protected][0],itemID,qnty; ex. setarray [email protected][0],909,5;
  22. Hi guys, i have a hunting board script wich i use the official quest system for hunting system and a custom sql table for the system itself (as zeny reward etc..). My issue i cant get the Mob Name or even Mob Killed Count. I cant get them by script so i was having a look on src but i dot know much about c++... What i'm doing at the moment for NPC show the hunting quest information is using a mob_id and mob_max_hunt columns on my custom SQL table but its not a good way as when i need to change the mob hunt amount for example i need to change it on the sql table and also on quest_db.... So... is that hard to have a function to get the mob_id and mob_count from the official quest log ??? Is there any ready to use code??? Tkss
  23. Always see you mapserv.bat to see whats the error. It was mostly syntax in that case. Ive tried this and its working: function script Get_MysteryBox { // If the summ != 100, Junk item is activated and has the difference in chance (45% in this example) set [email protected], 19578; // Apple setarray [email protected],1154,1183,1160,7110,1136,1101,1516; setarray [email protected][1],1,10,25,40,55,70,95; // The difference from the previous number is the chance. So Item 5979 has a (10-6 = 4%chance) set [email protected],rand(1,100); for ([email protected] =1; [email protected] <= getarraysize([email protected]); [email protected]++){ if ([email protected] <= [email protected][[email protected]]){ getitem [email protected][[email protected]],1; if (([email protected][[email protected]]- [email protected][[email protected]])<6) announce "A rare item has been created",bc_all; end; } } }
  24. Really usefull! Tks for that. Why this is not commited?? Any chance of both mine or your script be laggy??
×
×
  • Create New...

Important Information

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