scripting:samples:genericschool
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:samples:genericschool [2023/07/04 11:06] – mit | scripting:samples:genericschool [2025/05/28 18:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| $maLessonsList[] = | $maLessonsList[] = | ||
| - | {// cat. skill name price learn time graphic desc | + | {// cat. |
| - | 0, | + | 0, |
| - | 0, | + | 0, |
| - | 0, | + | 0, |
| - | 0, | + | 0, |
| | | ||
| - | 1, | + | 1, |
| 1, | 1, | ||
| 1, | 1, | ||
| Line 49: | Line 49: | ||
| { | { | ||
| osdcreate(OSDBUILDING," | osdcreate(OSDBUILDING," | ||
| - | osdaddat(FADEDTEXT, 50, 5, 500, 25, "", | + | osdadd(FADEDTEXT, 50, 5, 500, 25, "", |
| - | osdaddat(FADEDBUTTON, | + | osdadd(FADEDBUTTON, |
| - | osdaddat(SMALLFADEDTEXT, | + | osdadd(SMALLFADEDTEXT, |
| osdactivate() | osdactivate() | ||
| } | } | ||
| Line 131: | Line 131: | ||
| $skillPrice = SchoolGetModifiedPrice( $skillPrice ) | $skillPrice = SchoolGetModifiedPrice( $skillPrice ) | ||
| - | osdaddat(BIGTEXT, 0, 0, 600, 0, "", | + | osdadd(BIGTEXT, 0, 0, 600, 0, "", |
| - | osdaddat(IMAGE, 50, 60, 200, 200, "", | + | osdadd(IMAGE, 50, 60, 200, 200, "", |
| $textX = 300 | $textX = 300 | ||
| Line 140: | Line 140: | ||
| $subText = " | $subText = " | ||
| - | osdaddat(FADEDTEXT, $textX, $subtextY, $subtextWidth, | + | osdadd(FADEDTEXT, $textX, $subtextY, $subtextWidth, |
| $subtextY += 40 | $subtextY += 40 | ||
| $learnTimeText = sysGetRealTimeTextForDays( $learnTimeDays ); | $learnTimeText = sysGetRealTimeTextForDays( $learnTimeDays ); | ||
| - | osdaddat(BIGTEXT, $textX, $subtextY, 0, 0, "", | + | osdadd(BIGTEXT, $textX, $subtextY, 0, 0, "", |
| $subtextY += 26 | $subtextY += 26 | ||
| - | osdaddat(FADEDTEXT, $textX + 40, $subtextY, 0, 0, "", | + | osdadd(FADEDTEXT, $textX + 40, $subtextY, 0, 0, "", |
| $subtextY += 25 | $subtextY += 25 | ||
| - | osdaddat(BIGTEXT, $textX, $subtextY, 0, 0, "", | + | osdadd(BIGTEXT, $textX, $subtextY, 0, 0, "", |
| $subtextY += 30 | $subtextY += 30 | ||
| Line 156: | Line 156: | ||
| if ( $hasSkill > 0 ) | if ( $hasSkill > 0 ) | ||
| { | { | ||
| - | osdaddat(FADEDBUTTON, | + | osdadd(FADEDBUTTON, |
| } | } | ||
| else if ( $isLearning == 1 ) | else if ( $isLearning == 1 ) | ||
| { | { | ||
| - | osdaddat(FADEDBUTTON, | + | osdadd(FADEDBUTTON, |
| } | } | ||
| else if ( $gPlayerCash < $skillPrice ) | else if ( $gPlayerCash < $skillPrice ) | ||
| { | { | ||
| - | osdaddat(FADEDBUTTON, | + | osdadd(FADEDBUTTON, |
| } | } | ||
| else | else | ||
| { | { | ||
| - | osdaddat(EXITBUTTON, | + | osdadd(EXITBUTTON, |
| } | } | ||
| - | osdaddat(BUTTON, 200, 330, 200, 30, " | + | osdadd(BUTTON, 200, 330, 200, 30, " |
| osdactivate() | osdactivate() | ||
| } | } | ||
| Line 218: | Line 218: | ||
| $skillPrice = SchoolGetModifiedPrice( $skillPrice ) | $skillPrice = SchoolGetModifiedPrice( $skillPrice ) | ||
| - | osdaddat(IMAGE, $imageX, $lineY, 90, 90, " | + | osdadd(IMAGE, $imageX, $lineY, 90, 90, " |
| $textY = $lineY + 5 | $textY = $lineY + 5 | ||
| $priceText = sysGetPriceText( $skillPrice ) | $priceText = sysGetPriceText( $skillPrice ) | ||
| - | osdaddat(BIGTEXT, $textX, $textY, 0, 0, "", | + | osdadd(BIGTEXT, $textX, $textY, 0, 0, "", |
| $subtextY = $textY + 21 | $subtextY = $textY + 21 | ||
| - | osdaddat(TEXT, $textX, $subtextY, 0, 0, "", | + | osdadd(TEXT, $textX, $subtextY, 0, 0, "", |
| $subtextY = $textY + 40 | $subtextY = $textY + 40 | ||
| $subText = " | $subText = " | ||
| - | osdaddat(FADEDSMALLTEXT, | + | osdadd(FADEDSMALLTEXT, |
| if ( $numLessons <= 3 ) | if ( $numLessons <= 3 ) | ||
| Line 257: | Line 257: | ||
| } | } | ||
| - | osdaddat(BUTTON, 200, 330, 200, 30, " | + | osdadd(BUTTON, 200, 330, 200, 30, " |
| osdactivate() | osdactivate() | ||
| } | } | ||
scripting/samples/genericschool.1688468774.txt.gz · Last modified: (external edit)
