Jump to content
xisto Community

sonesay

Members
  • Content Count

    958
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by sonesay

  1. I have a general question about how ajax updates div's. Have you ever wanted to update a element inside a <div> but not nesseary update the whole div? here is an example echo "<div id='heading_general'>";echo "<h4>General <span id='general_total'>0</span> <button id='btn_general' onclick=\"tv('general_merits','btn_general');\">-</button></h4>";echo "</div>"; like if I tried updating the span id of 'general_total' it will work but the output will be put on its own line so it messes up the format. the only other solution I have to this is updating the whoole div 'heading_general' and it will all be outputed to one line. I'm sure you can see the reason for this you will only update 1 element and not have reload all. Notice from jlhaslip: Split, Edited, and Moved to Programming/OtherPlease do not post into a Member's Application for Hosting Thread.Thanks.
  2. ok i've scraped the idea to just try and reload a span inside a div and gone with just a full reload of the div. It just works but not exaclty how i would like it.I need somone with IE to test it out if you can. I have no windows and wonder if it works for IE. I tested it out on FF and Safari and it works fine. How ever the buttons for modifying HP and MP merits dont seem to work under lolOpera..
  3. Well another thing is we dont know for sure the univerise is infinite right? I mean we have no proof and its beyond our abilities to even try and find out. We just all assume to believe its infinite because we cant travel and see for our selves and it does make sense to think its infinite. Remember voltron when they travel to the end of the universe? Its a long time ago and I forget what happens after that.
  4. my merit system here. http://forums.xisto.com/no_longer_exists/ I've got a heading where it includes a number being the total that can change. Initially I've loaded it with a default value of 0 and then after the ajax retrieval gets replaced with a dummy value of 1 for now(I will do correct calculations later). The problem here is I'm not sure how I'm suppose to layout the heading properly to allow ajax updates to take place and only affect the number count. What happens after the ajax call is the new output number in this case '1' is is put on a new line of its own. echo "<h4>General <span id='general_total'>0</span> <button id='btn_general' onclick=\"tv('general_merits','btn_general');\">-</button></h4>"; echo "</div>"; linenums:0'>echo "<div id='heading_general'>"; echo "<h4>General <span id='general_total'>0</span> <button id='btn_general' onclick=\"tv('general_merits','btn_general');\">-</button></h4>";echo "</div>"; By the way I'm using ext javascript frame work for the ajax calls. There might be a problem if the updates don't work first time round because of loading delays just try again. This problem is on my part with the javascript code but I will address it at another time. [hr=noshade] [/hr] ok i've fixed the update problem and put a 4 second delay on the update of 'General' merits point count so you can see the initial display and how it messes up after the ajax call.
  5. This is getting interesting. Heres my story, I've never believed in god, well not everyone else's god. Most of it never made any sense to me so I never believed any of the stories I hear about god. What most of the stories I hear about god is that he's focused on us humans only, this I find it hard to believe since the universe is so infinite and we just happen to be the lucky species to be made in his image. I mean out of all the other species out there we are made in the image of god or at-least suppose to be with all this good qualities. Heres another theory say there is a god and then one of his creations created us just as some experiment. I know its crazy but if its a possibility. There is suns billions times bigger then our own out there (I've seen on a scale), Im not sure how scientist worked that out so on the scale of things we are like the tiniest of everything. So we are not directly linked on the real god and just a creation of his creation does this mean we aren't going to be saved? If we were directly created from god I cant imagine how far from perfect we are as human beings, so being created from a lesser god might seem more believable. What does seem to make sense now to me now or at-least this instance is yeah the universe has to be infinite and there has to be a higher power to have created it (God or A God). I cant imagine infinite being created out of nothing.
  6. http://forums.xisto.com/no_longer_exists/ in the profile section
  7. umm your pictures section not working. might want to fix that for people who want to see ^^
  8. Thanks a lot thats exactly what i am after. Later on I'm planning to use this same technique for a 3 column alignment similar to the example we just did. But the only difference is column widths need to be different. I hope I can assign individual widths to each li element will work. I will test this out soon.cheers
  9. yes its retrieved from mysql and put through some functtions then outputed. $hp = GetHP($race_index, $main_job_class, $sub_job_class, $main_job_level, $sub_job_level); $mp = GetMP($race_index, $main_job_class, $sub_job_class, $main_job_level, $sub_job_level); echo "HP " .$hp; echo "<br />"; echo "MP " .$mp; echo "<br />"; echo "<br />"; // output attributes $atrb[2] = "STR"; $atrb[3] = "DEX"; $atrb[4] = "VIT"; $atrb[5] = "AGI"; $atrb[6] = "INT"; $atrb[7] = "MND"; $atrb[8] = "CHR"; for ($stat_index = 2; $stat_index <=8; $stat_index++ ) { $stat_lvl = GetStat($race_index, $main_job_class, $sub_job_class, $stat_index, $main_job_level, $sub_job_level); echo $atrb[$stat_index] . " " . $stat_lvl . "<br />"; } I wont get stoned for using tables will I
  10. Thanks for the links. The overall layout is not what I'm trying to fix atm. I was afraid i would be unclear with my english. What I am after is a possible CSS solution to align the text: HP, MP, STR, DEX, VIT, AGI, INT, MND, CHR (all vertcally)100-, 250, 88, 67, 52, 75, 50, 55, 66 (all vertically) Bonus stats (all vertically)link in my attached picture.so if I was to do that in a table I would have a 3 column table. I'm starting to think that I will need to have 3 divs for the 3 columns inside the main div? I'm not that expericenced with CSS to be honest so I want to get this right and use it through out the rest of the page contents.I hope that makes it abit clear of what I am after.[hr=noshade] [/hr]sorry for repost. the attached image here is what I'm after. the effect of the right side. the left side is the default output with no alignment. I hope this is more clear. is it better just to use tables or css to try and get this vertical alignment effect.
  11. I know I can use tables to get this effect but I am not sure if CSS can do it. I have not found any examples so far, the only alignments with CSS I have come across are whole div elements and nothing for inside formatting like tables offer. Heres my current stage of my layout so far. select a character to see output. http://forums.xisto.com/no_longer_exists/ http://forums.xisto.com/no_longer_exists/ The attached file is of my original plan but at this stage I cannot do a php+ajax pagination for characters because of lack of knowledge so I went with the simple drop down list. There are some extra functions I decided to add on soon too (those two buttons but they dont do anything yet). So there are some few changes I did not think of first round but the overall layout should not change too much. my main concern at the moment is of aligning elements inside the main DIV's 'stats' and eventually 'merits' vertically. Is tables the only solution or can CSS achieve this?
  12. my mac book pro is basically on 24/7. I gotta leave it on for downloading movies/music. Sometimes I worry my mac will over heat but somehow it just keeps going. I've had it for over a year now and its still in good condition.
  13. are you editing the same file in both CC and DW? I only had one problem before with previous versions of DW they seem to take up a a lot of resources to run since its a big program and my mac only had 512mb memory. since switching to latest version of DW it runs better.Does it lag when running only both programs at once? if so the problem might be there.
  14. Can anyone clarify what the value in int() actually does? CREATE TABLE job_class (jc_id int(1) NOT NULL AUTO_INCREMENT PRIMARY KEY,jc_index int(2) NOT NULL,jc_name varchar(20) NOT NULL,jc_type varchar(20) NOT NULL); I was under the impression that any integer value used inside a () was the limit that data-type would have.In the PRIMARY KEY column I was able to add integer values 1-18. I'm kinda confused now If I can add 2 digit integers there then what is the point of assigning values inside brackets()For the varchar() any number put in there does limit the character allowed. e.g 'test' inserted into varchar(2) would result in 'te'
  15. Thats what I was trying to get at. Surely its been over 1-2 and the script has not worked for you yet. My situation is more like 1-2 months.
  16. Very handy for people who do not know a lot about computers. maybe sticky it?
  17. Yeah your within your rights to ask them to clarify things. If you do it too often it can become annoying to some people so just try to study material before class if you can. This will help you understand a lot better then just relying on lectures.
  18. There must be a problem with the script if thats how its suppose to work. A few members have posted this so far about this and on the other post I remember it was mention that once you have credits it will reactivate the account every hour.well I've had my account go in the red awhile back and same thing happen to me. I've been in the green now but account has not returned, I've tried accessing my account sonesay.trap17.com and ftp.sonesay.trap17.com nothing. I thought it was because I had to reapply again for hosting but now I'm not sure.can anyone clear this up? by the way my points have just been collecting since I cant access my site I figured its because my site is not active so I don't lose any credits.
  19. I've got a bunch of arrays that i want to use for more then 1 function. when i declear the arrays outside a function i cant use it in a function. This code was originally written in javascript by another person but since I plan to use it and extend it with php I had to change it from javascript to php code. In the javascript code the arrays were decleared outside the functions with 'var arrayname' I read somewhere that declearing javascript variables with 'var' gives it global access. Any ideas on how I can go about declearing 1 set of these arrays to be used by as many functions as I need without copying them into every function? below is current state with arrays inside GetHP(); function GetHP($raceIndex, $mjobIndex, $sjobIndex, $mainLevel, $subLevel) { // Hume D D D D D D D D D $raceGrades[0] = array(4, 4, 4, 4, 4, 4, 4, 4, 4); // Elvaan C E B E C F F B D $raceGrades[1] = array(3, 5, 2, 5, 3, 6, 6, 2, 4); // Taru G A F D E C A E D $raceGrades[2] = array(7, 1, 6, 4, 5, 3, 1, 5, 4); // Mithra D D E A E B D E F $raceGrades[3] = array(4, 4, 5, 1, 5, 2, 4, 5, 6); // Galka A G C D A E E D F $raceGrades[4] = array(1, 7, 3, 4, 1, 5, 5, 4, 6); $jobGrades[0] = array(4, 0, 4, 4, 4, 6, 4, 4, 2); // BST C x D C D F E E A $jobGrades[1] = array(3, 0, 4, 3, 4, 6, 5, 5, 1); // BLM F B F C F C A E D $jobGrades[2] = array(6, 2, 6, 3, 6, 3, 1, 5, 4); // BLU D D E E E E E E E $jobGrades[3] = array(4, 4, 5, 5, 5, 5, 5, 5, 5); // COR D x E C E C C E E $jobGrades[4] = array(4, 0, 5, 3, 5, 3, 3, 5, 5); // DRK C F A C C D C G G $jobGrades[5] = array(3, 6, 1, 3, 3, 4, 3, 7, 7); // DRG C x B D C D F E C $jobGrades[6] = array(3, 0, 2, 4, 3, 4, 6, 5, 3); // MNK A x C B A F G D E $jobGrades[7] = array(1, 0, 3, 2, 1, 6, 7, 4, 5); // NIN D x C B C B D G F $jobGrades[8] = array(4, 0, 3, 2, 3, 2, 4, 7, 6); // PLD C F B E A G G C C $jobGrades[9] = array(3, 6, 2, 5, 1, 7, 7, 3, 3); // PUP D x E B D C E F C $jobGrades[10] = array(4, 0, 5, 2, 4, 3, 5, 6, 3); // RNG E x E D D A E D E $jobGrades[11] = array(5, 0, 5, 4, 4, 1, 5, 4, 5); // RDM D D D D E E C C D $jobGrades[12] = array(4, 4, 4, 4, 5, 5, 3, 3, 4); // SAM B x C C C D E E D $jobGrades[13] = array(2, 0, 3, 3, 3, 4, 5, 5, 4); // SMN G A F E F D B B B $jobGrades[14] = array(7, 1, 6, 5, 6, 4, 2, 2, 2); // THF D x D A D B C G G $jobGrades[15] = array(4, 0, 4, 1, 4, 2, 3, 7, 7); // WAR B x A C D C F F E $jobGrades[16] = array(2, 0, 1, 3, 4, 3, 6, 6, 5); // WHM E C D F D E E A C $jobGrades[17] = array(5, 3, 4, 6, 4, 5, 5, 1, 3); $hpScale[0] = array( 0, 0, 0, 0); $hpScale[1] = array(19, 9, 1, 3); $hpScale[2] = array(17, 8, 1, 3); $hpScale[3] = array(16, 7, 1, 3); $hpScale[4] = array(14, 6, 0, 3); $hpScale[5] = array(13, 5, 0, 2); $hpScale[6] = array(11, 4, 0, 2); $hpScale[7] = array(10, 3, 0, 2); $mpScale[0] = array( 0, 0, 0); $mpScale[1] = array(16, 6, 4); $mpScale[2] = array(14, 5, 4); $mpScale[3] = array(12, 4, 4); $mpScale[4] = array(10, 3, 4); $mpScale[5] = array( 8, 2, 3); $mpScale[6] = array( 6, 1, 2); $mpScale[7] = array( 4, 0.5, 1); $statScale[0] = array(0, 0, 0); $statScale[1] = array(5, 0.50, 0.10); $statScale[2] = array(4, 0.45, 0.20); $statScale[3] = array(4, 0.40, 0.25); $statScale[4] = array(3, 0.35, 0.35); $statScale[5] = array(3, 0.30, 0.35); $statScale[6] = array(2, 0.25, 0.40); $statScale[7] = array(2, 0.20, 0.40); $baseValueColumn = 0; $scaleTo60Column = 1; $scaleOver60Column = 3; $scaleOver30Column = 2; $hpIndex = 0; // Set up temp variables $mainLevelE; $mainLevelX; $mainLevelXXX; $mainLevelLX; $mainLevelL; $subLevel; $subLevelX; $mainLevelUpTo60; $mainLevelOver10; $mainLevelOver30; $mainLevelOver60; $mainLevelOver50andUnder60; $subLevelOver10; $subLevelOver30; $raceHP; $jobHP; $sJobHP; $bonusHP = 0; $grade;// Get level breaks for changes in the stat formulas //##################################### // Primary HP levels // First scale up to 60 $mainLevelUpTo60 = $mainLevel - 1; if ($mainLevelUpTo60 > 59) $mainLevelUpTo60 = 59; // Different scale over level 60 $mainLevelOver60 = $mainLevel - 60; if ($mainLevelOver60 < 0) $mainLevelOver60 = 0; // +1 per level over 30 (depends on HP rating) $mainLevelOver30 = $mainLevel - 30; if ($mainLevelOver30 < 0) $mainLevelOver30 = 0; if ($mainLevelOver30 > 30) $mainLevelOver30 = 30; //##################################### // Bonus HP levels // +2 per level over 10 (all) $mainLevelOver10 = $mainLevel - 10; if ($mainLevelOver10 < 0) $mainLevelOver10 = 0; // +2 per level over 50 and under 60 $mainLevelOver50andUnder60 = $mainLevel - 50; if ($mainLevelOver50andUnder60 < 0) $mainLevelOver50andUnder60 = 0; if ($mainLevelOver50andUnder60 > 10) $mainLevelOver50andUnder60 = 10; //##################################### // Subjob bonus levels // +1 per level over 10 (/2) $subLevelOver10 = $subLevel - 10; if ($subLevelOver10 < 0) $subLevelOver10 = 0; if ($subLevelOver10 > 20) $subLevelOver10 = 20; // +1 per level over 30 $subLevelOver30 = $subLevel - 30; if ($subLevelOver30 < 0) $subLevelOver30 = 0;//--------------------------------------------------- // Calculate HP // For race $grade = $raceGrades[$raceIndex][$hpIndex]; $raceHP = floor($hpScale[$grade][$baseValueColumn] + $hpScale[$grade][$scaleTo60Column] * $mainLevelUpTo60 + $hpScale[$grade][$scaleOver30Column] * $mainLevelOver30 + $hpScale[$grade][$scaleOver60Column] * $mainLevelOver60); // For job $grade = $jobGrades[$mjobIndex][$hpIndex]; $jobHP = floor($hpScale[$grade][$baseValueColumn] + $hpScale[$grade][$scaleTo60Column] * $mainLevelUpTo60 + $hpScale[$grade][$scaleOver30Column] * $mainLevelOver30 + $hpScale[$grade][$scaleOver60Column] * $mainLevelOver60); // Bonus increments $bonusHP = 2 * $mainLevelOver10 + 2 * $mainLevelOver50andUnder60; // Bonus for monk (main job) if ($mjobIndex == 7) //"mnk" { // HP bonus of 30 at levels 15 and 35, bonus of 60 at levels 55 and 70 if ($mainLevel >= 15) $bonusHP += 30; if ($mainLevel >= 35) $bonusHP += 30; if ($mainLevel >= 55) $bonusHP += 60; if ($mainLevel >= 70) $bonusHP += 60; } // For subjob if ($subLevel > 0) { $grade = $jobGrades[$sjobIndex][$hpIndex]; $sjobHP = $hpScale[$grade][$baseValueColumn] + $hpScale[$grade][$scaleTo60Column] * ($subLevel - 1) + $subLevelOver10 + $subLevelOver30; $sjobHP = floor($sjobHP / 2); $sjobHP = $sjobHP + $hpScale[$grade][$scaleOver30Column] * $subLevelOver30; // Bonus for monk (sub job) if ($sjobIndex == 7) //"mnk" { // HP bonus of 30 at levels 15 and 35 if ($subLevel >= 15) $bonusHP += 30; if ($subLevel >= 35) $bonusHP += 30; } } else { $sjobHP = 0; } echo $raceHP . " "; echo $jobHP . " "; echo $sjobHP . " "; echo $bonusHP . " "; return ($raceHP + $jobHP + $sjobHP + $bonusHP);}$galka_war_hp = GetHP(4, 7, 16, 75, 37);echo "Galka WAR HP: ".$galka_war_hp; If I cut and paste the arrays in the above code outside the GetHP(); the function stops to work correctly. original java script: http://forums.xisto.com/no_longer_exists/ working example: http://forums.xisto.com/no_longer_exists/
  20. very common problem with working with layouts in CSS. I've used similar layouts in the past and when you start adding content into it the layout falls apart. I dont know whats causing it since I dont fully understand how to use CSS. Theres also the issue with certain broswers failing to display it correctly when others do.
  21. I did one project back about a year ago using xml. but I got to be honest I dont remember much and that was the only time I ever used it so I didnt get too deep in it. Had to use a xlst style sheet for it too but like i said I cant remember lol. It was a joint project with another student we barely passed that paper. I wished i had put more effort in to learn it now I dont have time. anyway show us what you doing with it if you can. links etc.
  22. I heard rumors a few years back that SC2 was going to come out but I thought nah I wont dare try make part 2. If it turns out crap that would be a diasater. SC was probably the best RTS at its time, nothing else came close to it. This coming from a hardcore gamer lol. Damn part 2 will be sick, I doubt blizzard will mess up with this now they have more experience now in making great games so dont expect anything but the best.What i liked about SC was it was fast paced action right from the start and there was so many ways to play that people starting writing build orders for specific strategies. Each race had specific strengths and weaknesses but the way you played the game determined if you win or lose. The game had a pretty advanced upgrade system for back in its time. Armor upgrades, weapons, abilities etc... theres too many to list if you havent played this game you dont know what your missing out on. BEST GAME EVER
  23. Sup all. Can somone put together a sticky with links for newbies on how to get started ? maybe include an overview of the steps to making a game and any other relavent additional infomation.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.